<div id="content">
  <!--<question-record [isGetRecord]='isGetRecord' [recordTime]='recordTime'></question-record>-->
  <div class="row s_page_title">
    <sa-big-breadcrumbs [items]="['系统配置', '数据优化']" icon="fa fa-cog"
      class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
  </div>
  <img src="assets/img/loading-0.gif" *ngIf="isShowLoading"
    style="z-index: 1000; position: fixed; top: 49%; left: 50%; margin-left: -30px; margin-top: -12px" />
  <!--<p style="font-size:16px;padding: 8px 0;margin:0;">
		<i class="fa fa-lg fa-fw fa-bar-chart-o"></i>
		<span style="color:rgb(51,51,51);font-weight:bold;"> 数据统计  > <span style="color:#1a6ddd;">数据绘图</span></span>
	</p>-->

  <div class="promptBox weightPromptBox">
    <ul>
      <li class="promptTitle">地磅数据信息</li>
      <li>
        <span class="weightDisc">●</span>
        地磅重量：{{ poundWeight }}
      </li>
      <li>● 误差值：{{ errorValue }}</li>
      <li>● 误差率：{{ errorRate }}</li>
      <li *ngIf="isRate16">● 16通道信号值：{{ ad16Value }}</li>
      <li *ngIf="isRate16">● 16通道误差率：{{ ad16Rate }}</li>
    </ul>
  </div>

  <div class="promptBox offlinePromptBox" style="width: 270px;">
    <ul>
      <li class="promptTitle">网络离线</li>
      <li>● 开始时间：{{ offlineShowData.offTime }}</li>
      <li>● 结束时间：{{ offlineShowData.onTime }}</li>
      <li>● 离线时长：{{ offlineShowData.showDate }}</li>
      <li style="word-break: break-all;">● 基站信息
        [前]：{{ offlineShowData.baseInfoBefore }}
      </li>
      <li style="word-break: break-all;">● 基站信息
        [后]：{{ offlineShowData.baseInfoAfter }}
      </li>
    </ul>
  </div>


  <div class="row" style="background: white; border-radius: 5px">
    <div class="col-xs-12 col-sm-12 col-md-12 form-horizontal page-header"
      style="min-height: 50px; height: 100%; font-size: 0; margin-top: 12px">
      <div class="top_module">
        <span class="module_text">接口类型</span>
        <select class="select2 diy_select" [(ngModel)]="apiType" style="vertical-align: top;width: 120px;">
          <option value="1">平台数据接口</option>
          <option value="2">API数据接口</option>
        </select>
      </div>
      <sa-company-tree-car-btn companyTreeId="companyTree" [keyCodeEvent]="clearEventFlag"
        [opreateCarNumber]="deleteCarFlag" (companySelected)="companySelected($event)"></sa-company-tree-car-btn>
      <!-- 磅单数量 -->
      <div class="top_module" [style.display]="loadometer ? 'inline-block' : 'none'">
        <span class="module_text">磅单车辆</span>
        <div class="s_hover_box">
          <select class="select2" id="loadometerSelect">
            <option value=""></option>
          </select>
          <div class="s_del_icon" (click)="del_loadometer()">x</div>

          <!-- 左右滑动 -->
          <div class="s_next_icon" *ngIf="carNumberWeight && deviceId && this.carList.length > 1">
            <div>
              <div class="arrow_up" (click)="nextCarLoad('pre')" [ngClass]="{ not_allow: isAllowPre }"></div>
            </div>
            <div>
              <div class="arrow_down" (click)="nextCarLoad('next')" [ngClass]="{ not_allow: isAllowNext }"></div>
            </div>
          </div>
          <div class="carIndexMess" *ngIf="carIndexMsg.status">{{ carIndexMsg.index }}/{{ carIndexMsg.allNums }}</div>
        </div>
      </div>

      <div class="drawSelectWrap top_module">
        <!-- device id start -->
        <span class="col-xs-3 drawSelectTtem">设备ID</span>

        <input [(ngModel)]="deviceId" class="form-control drawSelect" name="deviceId" id="deviceId" type="text"
          style="border: none; width: 120px" (input)="deviceIdChange($event)" />
      </div>
      <div class="selectDate">
        <div class="input-daterange input-group" style="position: relative">
          <input type="text" [(ngModel)]="startTime" class="form-control selecTime" id="datetimepicker1"
            style="width: 140px; border: none" autocomplete="off" placeholder="选择开始时间" />
          <span class="input-group-addon">至</span>
          <input type="text" [(ngModel)]="endTime" class="form-control selecTime" id="datetimepicker2"
            style="border: none" autocomplete="off" placeholder="选择结束时间" />
        </div>
        <div class="clearDate" (click)="del_date()">×</div>
      </div>

      <button type="button" class="btn btn-primary btn-sm draw-btn" (click)="showChart()">数据绘图</button>
      <button type="button" class="btn btn-primary btn-sm draw-btn" (click)="deviceDetail()">设备信息</button>
      <button type="button" class="btn btn-primary btn-sm draw-btn" (click)="openAutoResetView()">重置ID</button>
      <button type="button" class="btn btn-primary btn-sm draw-btn" (click)="versionUpdate()">固件升级</button>
      <!-- search button end -->
      <!--<div style="border-bottom:1px solid #cccccc69;margin-top: 15px;"></div>-->
    </div>

    <!-- 管理员权限才允许访问 -->
    <div class="col-xs-12" style="padding: 12px">
      <!--
			<div class="col-xs-1 diy_wrap fixDiy_wrap">
				<span class="diy_wrap_span">重量放大倍数 </span>
				<select class="multiple diy_wrap_select" [(ngModel)]='multiple'>
					<option value="1">系统默认</option>
					<option *ngFor='let item of magnificationArr' value="{{item}}">{{item}}倍</option>

				</select>
			</div>-->

      <div class="col-xs-2 diy_wrap fixDiy_wrap">
        <span class="diy_wrap_span">时间过滤</span>
        <select class="multiple diy_wrap_select" [(ngModel)]="filterTime"
          style="width: 128px; height: 26px; font-size: 12px">
          <option value="">系统默认</option>
          <option value="300">5分钟</option>
          <option value="600">10分钟</option>
          <option value="1200">20分钟</option>
          <option value="1800">30分钟</option>
        </select>
      </div>

      <!--<div class="col-xs-1 diy_check">
				<span class="diy_check_title">离线警报</span>
				<i class="fa fa-3x fa-bell-o" style="font-size: 16px;color: orange;"></i>
			</div>-->
      <div class="col-xs-1 diy_check">
        <span class="diy_check_title">AD信号</span>
        <input name="adSignal" type="checkbox" id="adSignal" class="diy_check_input adSignal" [(ngModel)]="lookSignal"
          (change)="signalChange()" />
        <label for="adSignal" class="diy_check_label"></label>
      </div>
      <div class="col-xs-1 diy_check">
        <span class="diy_check_title">设备电压</span>
        <input name="voltage" type="checkbox" id="voltage" class="diy_check_input voltage" [(ngModel)]="voltage"
          (change)="voltageChange()" />
        <label for="voltage" class="diy_check_label"></label>
      </div>
      <div class="col-xs-1 diy_check">
        <span class="diy_check_title">地磅数据</span>
        <input name="loadometer" type="checkbox" id="loadometer" class="diy_check_input loadometer"
          [(ngModel)]="loadometer" (change)="loadometerChange()" />
        <label for="loadometer" class="diy_check_label"></label>
      </div>
      <div class="col-xs-1 diy_check">
        <span class="diy_check_title">车辆速度</span>
        <input name="carSpeed" type="checkbox" class="diy_check_input carSpeed" id="carSpeed" [(ngModel)]="carSpeed"
          (change)="carSpeedChange()" />
        <label for="carSpeed" class="diy_check_label"></label>
      </div>

      <div class="col-xs-1 diy_check">
        <span class="diy_check_title">地图联动</span>
        <input name="linetoMap" type="checkbox" id="linetoMap" class="diy_check_input linetoMap" [(ngModel)]="linetoMap"
          (change)="showRailChange()" />
        <label for="linetoMap" class="diy_check_label"></label>
      </div>

      <div class="col-xs-1 diy_check">
        <span class="diy_check_title">修正数据</span>
        <input name="showModify" type="checkbox" class="diy_check_input" id="showModify" [(ngModel)]="showModify"
          (change)="modifyChange()" />
        <label for="showModify" class="diy_check_label"></label>
      </div>

      <!--<div class="col-xs-1 diy_check">
				<span class="diy_check_title">问题记录</span>
				<input name="questionRecord" type="checkbox" class="diy_check_input" id="questionRecord" [(ngModel)]='questionRecord'>
				<label for="questionRecord" class="diy_check_label"></label>
			</div>-->
      <div class="col-xs-1 diy_check none">
        <span class="diy_check_title">版本号</span>
        <input name="versionNumber" type="checkbox" class="diy_check_input" id="versionNumber"
          [(ngModel)]="versionNumber" />
        <label for="versionNumber" class="diy_check_label"></label>
      </div>

      <div class="col-xs-1 diy_check" style="width: 150px">
        <span class="diy_check_title">网络离线位置</span>
        <input name="offlineStatus" type="checkbox" class="diy_check_input" id="offlineStatus"
          (click)="offlineStatusChange($event)" [(ngModel)]="offlineStatus" />
        <label for="offlineStatus" class="diy_check_label"></label>
      </div>

      <!-- <div class="col-xs-1 diy_check" style="width: 160px">
        <span class="diy_check_title">标记损坏传感器</span>
        <input name="sensorChannel" type="checkbox" class="diy_check_input" id="sensorChannel"
          (click)="sensorChannelChange()" [(ngModel)]="sensorChannel" />
        <label for="sensorChannel" class="diy_check_label"></label>
      </div> -->
      <div class="col-xs-1 diy_check" style="width: 150px">
        <span class="diy_check_title">标记设备状态</span>
        <input name="deviceStatus" type="checkbox" class="diy_check_input" id="deviceStatus"
          (click)="deviceStatusChange()" [(ngModel)]="deviceStatus" />
        <label for="deviceStatus" class="diy_check_label"></label>
      </div>
    </div>
    <div *ngIf="lookSignal" class="col-xs-12" style="margin-bottom: 5px">
      <div *ngIf="
          versionMessage.name ||
          versionMessage.versionString ||
          versionMessage.carUploadDate ||
          versionMessage.gpsUploadDate ||
          versionMessage.runStatus
        " class="col-xs-12">
        版本号:{{ versionMessage.name }}; 系数:[ {{ versionMessage.versionString }} ];
        <span style="margin-left: 4px">车辆状态:</span>
        <span class="red" *ngIf="versionMessage.runStatus == '0'">
          离线
          <span *ngIf="versionMessage.alarmType">{{ versionMessage.alarmType }}</span>
        </span>
        <span *ngIf="versionMessage.runStatus == '0'">;</span>
        <span class="green" *ngIf="versionMessage.runStatus !== '0'">
          在线
          <span *ngIf="versionMessage.alarmType">{{ versionMessage.alarmType }}</span>
        </span>
        <span *ngIf="versionMessage.runStatus !== '0'">;</span>
        <span style="margin-left: 4px">重量时间:{{ versionMessage.carUploadDate }};</span>
        <span style="margin-left: 4px">GPS时间:{{ versionMessage.gpsUploadDate }};</span>
        <span style="margin-left: 4px">更新时间:{{ versionMessage.updateTime }};</span>
        <span style="margin-left: 4px; font-weight: bold" class="red" *ngIf="versionMessage.isShowGPS">
          GPS更新异常;
        </span>
        <!-- 新增显示续费的信息 2020-10-12 张卓-->
        <!-- <span *ngIf="renewalInfo && renewalInfo.isSyncRenewal" class="renewalInfoWrap">
          <span style="margin-left: 4px">
            续费信息:
            <span class="item-value stand_out" [ngClass]="{
                isDieLine: renewalInfo.isOverDate == '已到期',
                noDieLine: renewalInfo.isOverDate != '已到期'
              }">
              {{ renewalInfo.isOverDate }}
            </span>
            ;
          </span>
          <span style="margin-left: 4px">
            到期时间:
            <span class="item-value">{{ renewalInfo.renewalDueTime }}</span>
            ;
          </span>
          <button _ngcontent-c9="" style="padding: 2px 8px !important; font-size: 12px" class="btn btn-primary"
            type="button" (click)="goRenewal()">
            跳转续费页面
          </button>
        </span> -->

      </div>
      <div *ngIf="carRenewalInfo" class="col-xs-12">
        <span class="renewalInfoWrap">
          <span>服务到期:
            <span *ngFor='let item of carRenewalInfo.renewalFactoryList;let isLast = last;'
              [ngClass]="{ 'expired-factory-color': item.status === 1, 'red': item.isExpired}"
              title="{{item.factoryName + '服务到时间：' + item.renewalDueTime}}">
              {{item.factoryName}}{{ item.status === 1 ?' [停用]' : ''}}{{!isLast ? ',' : ''}}
            </span>
          </span>
          <button _ngcontent-c9=""
            style="padding: 2px 8px !important; font-size: 12px;margin-left: 5px;margin-right: 5px;"
            class="btn btn-primary" type="button" (click)="goRenewal()">
            跳转续费页面
          </button>
          <span>保修到期:
            <span [ngClass]="{'red': carRenewalInfo.isHostDate}"
              title="{{'主机保修到时间：' + carRenewalInfo.warrantyExpirationTime}}">
              主机{{carRenewalInfo.sensorRepairInfoList.length > 0 ? ',' : ''}}
            </span>
            <span *ngFor='let item of carRenewalInfo.sensorRepairInfoList;let isLast = last;'
              [ngClass]="{'red': item.orNotExpired}"
              title="{{ '传感器' + item.sensorNumber +'保修到时间：' + item.warrantyExpirationTime}}">
              传感器{{item.sensorNumber}}{{!isLast ? ',' : ''}}
            </span>
          </span>
        </span>
      </div>
    </div>
  </div>
  <div style="background-color: white; position: relative">
    <div class="promptBox alertPromptBox">
      <ul>
        <li class="promptTitle">{{ alertChartModelInfo.name }}</li>
        <!--<li> ● 异常类型：{{alertChartModelInfo.name}}</li>-->
        <li>● 开始时间：{{ alertChartModelInfo.offTime }}</li>
        <li>● 结束时间：{{ alertChartModelInfo.onTime }}</li>
        <li>● 异常时长：{{ alertChartModelInfo.rangeTime }}</li>
        <li>● 发生地址：{{ alertChartModelInfo.address }}</li>
      </ul>
    </div>
    <div class="promptBox versionChartModuleBox">
      <ul>
        <li class="promptTitle">固件升级</li>
        <li>● 前版本：{{ versionChartModuleInfo.prevVersion }}</li>
        <li>● 升级版本：{{ versionChartModuleInfo.version }}</li>
        <li>● 升级时间：{{ versionChartModuleInfo.createTime }}</li>
        <!--<li> ● 操作人：{{versionChartModuleInfo.userName}}</li>-->
      </ul>
    </div>
    <div class="promptBox coefChartModuleBox">
      <ul>
        <li class="promptTitle">系数设置</li>
        <li>
          ● 旧系数：
          <span *ngFor="let item of coefChartModuleInfo.oldCoef; let index = index"
            [style.display]="item ? 'inline-block' : 'none'">
            <span>CH{{ index + 1 }}:{{ item }};</span>
          </span>
        </li>
        <li>
          ● 新系数：
          <span *ngFor="let item of coefChartModuleInfo.newCoef; let index = index"
            [style.display]="item ? 'inline-block' : 'none'">
            <span>CH{{ index + 1 }}:{{ item }};</span>
          </span>
        </li>
        <li>● 设置时间：{{ coefChartModuleInfo.sendTime }}</li>
        <li>● 操作人：{{ coefChartModuleInfo.userName }}</li>
      </ul>
    </div>
    <!-- 在线进厂 -->
    <div class="promptBox companyChartModuleBox">
      <ul>
        <li>● 车牌号码：{{ companyChartModuleInfo.carNumber }}</li>
        <li>● 厂区名称：{{ companyChartModuleInfo.companyName }}</li>
        <li>● 进厂时间：{{ companyChartModuleInfo.lostime }}</li>
        <li>● 离厂时间：{{ companyChartModuleInfo.leaveTime }}</li>
      </ul>
    </div>
    <div id="chart" style="height: 450px"></div>
    <!-- 已到期 -->
    <div id="overdueModal">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" (click)="closeOverdueModal()" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
          <h4 class="modal-title">提示</h4>
        </div>
        <div class="modal-body">
          <p style="color: red">该车辆已到期！</p>
          <p>到期时间：{{ renewalInfo.renewalDueTime }}</p>
          <p>过期天数：{{ expireTime }}</p>
        </div>
      </div>
      <!-- 已到期-->
    </div>
    <!-- 标记设备状态弹框 -->
    <div style="
        width: 36%;
        position: absolute;
        right: 24px;
        top: 0;
        border: 1px solid #ccc;
        border-radius: 4px;
        padding: 10px;
        height: 420px;
        overflow: auto;
      " id="deviceStatusModuleBox">
      <div style="width: 348px" class="deviceStatusModule">
        <!-- <div class="selectProblemDate">
          <div class="input-daterange input-group" style="position: relative">
            <input type="text" [(ngModel)]="problemStartTime" class="form-control selecTime" id="datetimepicker3"
              style="width: 140px; border: none" autocomplete="off" placeholder="选择开始时间" />
            <span class="input-group-addon">至</span>
            <input type="text" [(ngModel)]="problemEndTime" class="form-control selecTime" id="datetimepicker4"
              style="border: none" autocomplete="off" placeholder="选择结束时间" />
          </div>
          <div class="clearDate" (click)="del_problemdate()">×</div>
        </div> -->
        <div class="form-group group" style="white-space: nowrap">
          <div style="margin-top: 4px">
            <div class="inline_block" (click)="sensorSelectAllClick()" style="margin-left: 10px">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': sensorSelectAll.selected }"></span>
              <span style="font-weight: bold">{{ sensorSelectAll.text }}</span>
            </div>
            <div *ngIf="faultProblemResults[0] && faultProblemResults[0].linkWaitRepairRecordId"
              (click)="autoReset(limitModal,faultProblemResults[0])"
              class="inline_block right clearfix problem-wrapper">
              <div class="problem-border mr-12"
                [ngClass]="{ abnormal: faultProblemResults[0].limitEnterFactoryCode === 1 }">
                <span class="inline_block section">
                  传感器待维修
                </span>
                <span class="inline_block section restrict-tag">
                  {{ faultProblemResults[0].limitEnterFactoryCode === 1 ? '限制' : '不限制'}}
                </span>
              </div>
              <div class="fault-tooltip-container tooltip bottom" role="tooltip">
                <div class="tooltip-arrow"></div>
                <div class="tooltip-inner">
                  <div>故障现象：</div>
                  <!-- <div>{{faultProblemResults[0].faultPhenomenon ? faultProblemResults[0].faultPhenomenon.join(','): ''}}
                  </div> -->
                  <div *ngFor="let phenomenon of faultProblemResults[0].faultPhenomenon">{{ phenomenon }}</div>
                </div>
              </div>
            </div>
            <!-- <div (click)="allSensorKeepValue()" class="lisItem right" style="margin-right: 8px; margin-left: 0">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': isAllStraight }"></span>
              <span>传感器全部平直</span>
            </div> -->
          </div>
          <div>
            <div class="clearfix">
              <ul>
                <li *ngFor="let item of sensorModuleList" class="table_scroll"
                  style="padding-left: 8px; margin-top: 8px; overflow: visible">
                  <button class="btn-link" title="单个传感器问题提交" (click)="updateSensorProblem(item)">更新</button>
                  <span class="channel-style bg-green sensorModuleFront" [ngClass]="{ 'bg-normal': !item.flag }">
                    {{ item.value }}
                    <i class="channel-style sensorFront front" *ngIf="item.isFront == '1'">前</i>
                    <i class="channel-style sensorFront bottom" *ngIf="item.isFront == '2'">后</i>
                  </span>
                  <div class="inline_block" style="margin-left: 4px; margin-top: 5px">
                    <div *ngFor="let lis of item.child" (click)="sensorLisSelected(item.value, lis.code)"
                      class="lisItem" style="margin-right: 8px; margin-left: 0">
                      <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': lis.selected }"></span>
                      <span>{{ lis.text }}</span>
                    </div>
                  </div>
                  <div style="font-size: 12px" *ngIf="item.selected && item.startTime && item.endTime">
                    <div class="item-box inline_block">
                      <span class="item-key"></span>
                      <span class="item-value" [attr.title]="">{{ item.operator }}</span>
                    </div>
                    <div class="item-box inline_block">
                      <span class="item-key"></span>
                      <span class="item-value" [attr.title]="">{{ item.startTime }} 至 {{ item.endTime }}</span>
                    </div>
                    <button class="btn-link" title="问题区间曲线、轨迹" (click)="dataDrawEchartBMap(item)">查看</button>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="borderdiv"></div>
        <div class="form-group group" style="white-space: nowrap">
          <div style="margin-bottom: 8px">
            <div class="inline_block" (click)="GPSSelectAllClick()" style="margin-left: 10px">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': GPSSelectAll.selected }"></span>
              <span style="font-weight: bold">{{ GPSSelectAll.text }}</span>
            </div>
            <div *ngIf="faultProblemResults[1] && faultProblemResults[1].linkWaitRepairRecordId"
              (click)="autoReset(limitModal,faultProblemResults[1])"
              class="inline_block right clearfix problem-wrapper">
              <div class="problem-border mr-12"
                [ngClass]="{ abnormal: faultProblemResults[1].limitEnterFactoryCode === 1 }">
                <span class="inline_block section">
                  GPS待维修
                </span>
                <span class="inline_block section restrict-tag">
                  {{ faultProblemResults[1].limitEnterFactoryCode === 1 ? '限制' : '不限制'}}
                </span>
              </div>
              <div class="fault-tooltip-container tooltip bottom" role="tooltip">
                <div class="tooltip-arrow"></div>
                <div class="tooltip-inner">
                  <div>故障现象：</div>
                  <!-- <div>{{faultProblemResults[1].faultPhenomenon ? faultProblemResults[1].faultPhenomenon.join(','): ''}}
                  </div> -->
                  <div *ngFor="let phenomenon of faultProblemResults[1].faultPhenomenon">{{ phenomenon }}</div>
                </div>
              </div>
            </div>
            <!-- <div *ngIf="faultProblemResults[1]&& faultProblemResults[1].linkWaitRepairRecordId"
              class="inline_block right clearfix problem-border mr-12"
              [ngClass]="{ abnormal: faultProblemResults[1].limitEnterFactoryCode === 1 }"
              (click)="autoReset(limitModal,faultProblemResults[1])">
              <span class="inline_block section">
                GPS待维修
              </span>
              <span class="inline_block section restrict-tag">
                {{ faultProblemResults[1].limitEnterFactoryCode === 1 ? '限制' : '不限制'}}
              </span>
            </div> -->
          </div>
          <button class="btn-link" title="GPS问题提交" (click)="updateGPSProblem()" style="margin-left: 8px">
            更新
          </button>
          <div class="inline_block" id="gpsCheckboxList">
            <div *ngFor="let lis of GPSModuleList" (click)="GPSLisSelected(lis.code)" class="lisItem self-xs-45">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': lis.selected }"></span>
              <span>{{ lis.text }}</span>
            </div>
          </div>
          <div style="font-size: 12px; margin-left: 8px"
            *ngIf="GPSProblemList.selected && GPSProblemList.startTime && GPSProblemList.endTime">
            <div class="item-box inline_block">
              <span class="item-key"></span>
              <span class="item-value" [attr.title]="">{{ GPSProblemList.operator }}</span>
            </div>
            <div class="item-box inline_block">
              <span class="item-key"></span>
              <span class="item-value" [attr.title]="">
                {{ GPSProblemList.startTime }} 至 {{ GPSProblemList.endTime }}
              </span>
            </div>
            <button class="btn-link" title="问题区间曲线、轨迹" (click)="dataDrawEchartBMap(GPSProblemList)">
              查看
            </button>
          </div>
        </div>
        <div class="borderdiv" style="margin-top: 2px"></div>
        <div class="form-group group" style="padding: 0 12px">
          <div style="margin-bottom: 8px">
            <div class="inline_block" (click)="hostSelectAllClick('click')">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': hostAllSelect }"></span>
              <span style="font-weight: bold">主机问题</span>
            </div>
            <div *ngIf="faultProblemResults[2] && faultProblemResults[2].linkWaitRepairRecordId"
              (click)="autoReset(limitModal,faultProblemResults[2])"
              class="inline_block right clearfix problem-wrapper">
              <div class="problem-border" [ngClass]="{ abnormal: faultProblemResults[2].limitEnterFactoryCode === 1 }">
                <span class="inline_block section">
                  主机待维修
                </span>
                <span class="inline_block section restrict-tag">
                  {{ faultProblemResults[2].limitEnterFactoryCode === 1 ? '限制' : '不限制'}}
                </span>
              </div>
              <div class="fault-tooltip-container tooltip bottom" role="tooltip">
                <div class="tooltip-arrow"></div>
                <div class="tooltip-inner">
                  <div>故障现象：</div>
                  <div *ngFor="let phenomenon of faultProblemResults[2].faultPhenomenon">{{ phenomenon }}</div>
                </div>
              </div>
            </div>
          </div>
          <div class="inline_block">
            <div class="inline_block" (click)="deviceOfflineClick()">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': deviceOffline.selected }"></span>
              <span>{{ deviceOffline.text }}</span>
            </div>
          </div>
          <div class="inline_block" style="margin-left: 5px">
            <div class="inline_block" (click)="deviceContactClick()">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': deviceContact.selected }"></span>
              <span>{{ deviceContact.text }}</span>
            </div>
          </div>
          <div class="inline_block" style="margin-left: 5px; margin-bottom: 5px">
            <div class="inline_block" (click)="distrustThrowClick()">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': distrustThrow.selected }"></span>
              <span>{{ distrustThrow.text }}</span>
            </div>
          </div>
        </div>
        <div class="borderdiv" style="margin-top: 2px"></div>
        <div class="form-group group" style="padding: 0 12px">
          <div style="margin-bottom: 8px">
            <div class="inline_block" (click)="otherSelectAllClick('click')">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': otherAllSelect }"></span>
              <span style="font-weight: bold">其他</span>
            </div>
            <div *ngIf="faultProblemResults[3] && faultProblemResults[3].linkWaitRepairRecordId"
              (click)="autoReset(limitModal,faultProblemResults[3])"
              class="inline_block right clearfix problem-wrapper">
              <div class="problem-border" [ngClass]="{ abnormal: faultProblemResults[3].limitEnterFactoryCode === 1 }">
                <span class="inline_block section">
                  其他待维修
                </span>
                <span class="inline_block section restrict-tag">
                  {{ faultProblemResults[3].limitEnterFactoryCode === 1 ? '限制' : '不限制'}}
                </span>
              </div>
              <div class="fault-tooltip-container tooltip bottom" role="tooltip">
                <div class="tooltip-arrow"></div>
                <div class="tooltip-inner">
                  <div>故障现象：</div>
                  <!-- <div>{{faultProblemResults[3].faultPhenomenon ? faultProblemResults[3].faultPhenomenon.join(','): ''}}
                  </div> -->
                  <div *ngFor="let phenomenon of faultProblemResults[3].faultPhenomenon">{{ phenomenon }}</div>
                </div>
              </div>
            </div>
            <!-- <div *ngIf="faultProblemResults[3] && faultProblemResults[3].linkWaitRepairRecordId"
              class="inline_block right clearfix problem-border"
              [ngClass]="{ abnormal: faultProblemResults[3].limitEnterFactoryCode === 1 }"
              (click)="autoReset(limitModal,faultProblemResults[3])">
              <span class="inline_block section">
                其他待维修
              </span>
              <span class="inline_block section restrict-tag">
                {{ faultProblemResults[2].limitEnterFactoryCode === 1 ? '限制' : '不限制'}}
              </span>
            </div> -->
          </div>
          <div class="inline_block">
            <div class="inline_block" (click)="deviceOtherClick()">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': deviceOther.selected }"></span>
              <span>{{ deviceOther.text }}</span>
            </div>
            <input *ngIf="deviceOther.selected" placeholder="问题描述(如: 4pin接口, 更换主机)"
              style="width: 188px; margin-left: 5px;" [(ngModel)]="hardwareIssueDescription" />
          </div>
          <div class="inline_block" style="margin-left: 82px">
            <div class="inline_block" (click)="deviceRepairedIspushClick()">
              <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': deviceRepairedIspush.selected }"></span>
              <span>{{ deviceRepairedIspush.text }}</span>
            </div>
          </div>
        </div>
        <div class="borderdiv"></div>
        <div>
          <button type="button" class="btn btn-primary" (click)="addDeviceRepaired()" style="margin-bottom: 5px">
            添加维修记录
          </button>
          <button type="button" class="btn btn-primary" (click)="updataDeviceStatus()"
            style="margin-right: 10px; margin-bottom: 5px">
            更新设备状态
          </button>
          <button type="button" class="btn btn-primary" (click)="editDeviceInfo(editDeciceModal)"
            style="margin-bottom: 5px">
            编辑设备信息
          </button>
        </div>
        <div class="borderdiv"></div>
        <div class="form-group">
          <div style="font-weight: bold; padding: 6px 10px">算法问题</div>
          <div *ngFor="let lis of algorithmQuestionList" (click)="algorithmLisSelected(lis.text)"
            class="lisItem col-xs-4" style="min-width: 100px; float: left; margin-left: 0px; margin-bottom: 10px">
            <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': lis.selected }"></span>
            <span style="color: #333">{{ lis.text }}</span>
          </div>
        </div>
        <div class="form-group" style="clear: both; padding-left: 10px; padding-top: 5px">
          <button type="button" class="btn btn-primary" (click)="updataOrderStatus()">算法问题提交</button>
        </div>
      </div>
    </div>
    <!-- 标记设备状态弹框结束 -->
  </div>
  <div [hidden]="!linetoMap" style="padding: 12px; background: #fff; margin-top: 32px">
    <!-- <div id="allmap" style="height: 480px;" class="fix-maplabel"></div> -->

    <div class="map-box">
      <div id="allmap" style="height: 480px" class="fix-maplabel"></div>
      <sa-bmap-tools [baiduMap]="myMap" [isShowZoom]="true" [reduceWidth]="472" baiduMapId="allmap"></sa-bmap-tools>
    </div>
  </div>

  <div class="row" style="margin-top: 12px; background-color: #fff; padding: 28px 0 28px 20px">
    <div class="col-xs-12 form-horizontal">
      <div class="problems row">
        <div class="clearfix" *ngIf="sensorChannel">
          <div class="form-group sensorCH col-xs-12">
            <label class="control-label col-sm-1 no-padding-right">传感器</label>
            <div class="col-sm-10">
              <div style="border: 1px solid #ccc; padding-bottom: 8px; padding-left: 12px">
                <div>
                  <label class="checkbox-inline" *ngFor="let item of sensorArr">
                    <input type="checkbox" class="checkbox style-0" [value]="item.id" [name]="item.text"
                      [(ngModel)]="item.checked" (change)="sensorChange(item.id, $event)" />
                    <span>{{ item.text }}</span>
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group col-xs-12 col-sm-4">
            <label class="control-label col-sm-3">开始时间</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input type="text" autocomplete="off" name="startTime_sensor"
                  (click)="inpSelectEvent('startTime_sensor')" class="form-control getChartTime bottomborder"
                  [(ngModel)]="startTime_sensor" placeholder="时间格式：yyyy-MM-dd HH:mm:ss"
                  [ngClass]="{ endueTime: inpSelect == 'startTime_sensor' }" />
              </div>
            </div>
          </div>

          <div class="form-group col-xs-12 col-sm-4">
            <label class="control-label col-sm-3">结束时间</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input type="text" autocomplete="off" name="endTime_sensor" (click)="inpSelectEvent('endTime_sensor')"
                  class="form-control getChartTime bottomborder" [(ngModel)]="endTime_sensor"
                  placeholder="时间格式：yyyy-MM-dd HH:mm:ss" [ngClass]="{ endueTime: inpSelect == 'endTime_sensor' }" />
              </div>
            </div>
          </div>
          <button class="btn btn-primary" (click)="submitSensor()">提交</button>
          <div class="table_scroll col-xs-12">
            <table
              class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
              <thead>
                <tr>
                  <th>设备ID</th>
                  <th>车牌号码</th>
                  <th>人工检测损坏通道</th>
                  <th>开始时间[人工]</th>
                  <th>结束时间[人工]</th>
                  <th>记录时间</th>
                  <th>记录人员</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let row of sensorTableData">
                  <td>{{ row.deviceId }}</td>
                  <td>{{ row.carNumber }}</td>
                  <td>{{ row.channel }}</td>
                  <td>{{ row.startTime }}</td>
                  <td>
                    <span *ngIf="row.endTime">{{ row.endTime }}</span>
                    <span *ngIf="!row.endTime">无</span>
                  </td>
                  <td>{{ row.createTime }}</td>
                  <td>{{ row.createUser }}</td>
                  <td>
                    <button type="button" (click)="delRow(row)">删除</button>
                  </td>
                </tr>
              </tbody>
            </table>
            <div *ngIf="sensorTableData.length == 0" style="color: #ccc; margin: 20px">暂无数据</div>
          </div>
          <div class="col-xs-12 borderdiv"></div>
        </div>
      </div>

      <div class="bodyContent">
        <div class="form-group col-xs-12 col-sm-4">
          <label class="control-label col-sm-3 no-padding-right">问题开始时间</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <input type="text" autocomplete="off" name="startTime_problem"
                (click)="inpSelectEvent('startTime_problem')" class="form-control getChartTime bottomborder"
                [(ngModel)]="startTime_problem" placeholder="时间格式：yyyy-MM-dd HH:mm:ss"
                [ngClass]="{ endueTime: inpSelect == 'startTime_problem' }" />
            </div>
          </div>
        </div>

        <div class="form-group col-xs-12 col-sm-4">
          <label class="control-label col-sm-3 no-padding-right">问题结束时间</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <input type="text" autocomplete="off" name="endTime_problem" (click)="inpSelectEvent('endTime_problem')"
                class="form-control getChartTime bottomborder" [(ngModel)]="endTime_problem"
                placeholder="时间格式：yyyy-MM-dd HH:mm:ss" [ngClass]="{ endueTime: inpSelect == 'endTime_problem' }" />
            </div>
          </div>
        </div>

        <div class="form-group col-xs-12 col-sm-4">
          <label class="control-label col-sm-3 no-padding-right">问题类型</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <select class="form-control inline_block fix_padding bottomborder" [(ngModel)]="proTypeParams.problemType"
                (change)="problemTypeChange()">
                <option value="">请选择</option>
                <option *ngFor="let item of proTypeOptions; let i = index" [attr.value]="i">{{ item.name }}</option>
              </select>
            </div>
          </div>
        </div>

        <div class="form-group col-xs-12 col-sm-4" *ngIf="proTypeParams.problemType">
          <label class="control-label col-sm-3 no-padding-right">问题分类</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <select class="form-control inline_block fix_padding bottomborder"
                [(ngModel)]="proTypeParams.problemClass" (change)="problemClassChange()">
                <option value="">请选择</option>
                <option *ngFor="let item of proSlectedItem.childs; let i = index" [attr.value]="i">
                  {{ item.name }}
                </option>
              </select>
            </div>
          </div>
        </div>

        <div *ngIf="proTypeParams.problemType == '1' && proTypeParams.problemClass == '1'; else notflag">
          <div class="form-group col-xs-12 col-sm-4"
            *ngIf="proTypeParams.problemClass && proSlectedItem.childs[+proTypeParams.problemClass].phenomenon">
            <label class="control-label col-sm-3 no-padding-right">问题现象</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <select id="sensorPhenName" class="form-control inline_block fix_padding bottomborder">
                  <option value="">请选择</option>
                  <option value="1">传感器1</option>
                  <option value="2">传感器2</option>
                  <option value="3">传感器3</option>
                  <option value="4">传感器4</option>
                  <option value="5">传感器5</option>
                  <option value="6">传感器6</option>
                  <option value="7">传感器7</option>
                  <option value="8">传感器8</option>
                  <option value="9">传感器9</option>
                  <option value="10">传感器10</option>
                  <option value="11">传感器11</option>
                  <option value="12">传感器12</option>
                  <option value="13">传感器13</option>
                  <option value="14">传感器14</option>
                  <option value="15">传感器15</option>
                  <option value="16">传感器16</option>
                </select>
              </div>
            </div>
          </div>
          <div class="form-group col-xs-12 col-sm-4">
            <label class="control-label col-sm-3 no-padding-right" style="text-align: center">一一</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <select class="form-control inline_block fix_padding bottomborder"
                  [(ngModel)]="proTypeParams.phenomenon" (change)="problemPhenChange()">
                  <option value="">请选择</option>
                  <option
                    *ngFor="let item of proSlectedItem.childs[+proTypeParams.problemClass].phenomenon; let i = index"
                    [attr.value]="i">
                    {{ item.name }}
                  </option>
                </select>
              </div>
            </div>
            <button (click)="addseneorPhenItem()" class="addOrDel">+</button>
            <!--<label class="control-label col-sm-1 no-padding" style="text-align: center;"><button (click)="addseneorPhenItem()" style="padding: 4px 8px;">+</button> </label>-->
          </div>

          <div class="form-group col-xs-12 col-sm-12" *ngIf="seneorPhenlist.length > 0">
            <label class="control-label col-sm-1 no-padding-right">&nbsp;</label>
            <div class="col-sm-10">
              <div class="row ssItemWarp">
                <div *ngFor="let item of seneorPhenlist; let i = index" class="col-xs-3">
                  <div class="ssItemStyle">
                    <span>
                      {{ i + 1 }} ：{{ item.sensorName }}
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;
                      {{ item.phenomenon }}
                    </span>
                    <span style="position: absolute; right: 12px; cursor: pointer" (click)="delSeneorPhenItem(i)">
                      ×
                    </span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>

        <ng-template #notflag>
          <div>
            <div class="form-group col-xs-12 col-sm-4" *ngIf="proTypeParams.problemClass">
              <label class="control-label col-sm-3 no-padding-right">问题现象</label>
              <div class="col-sm-9" *ngIf="!pcIsOther">
                <div class="clearfix">
                  <select class="form-control inline_block fix_padding bottomborder"
                    [(ngModel)]="proTypeParams.phenomenon" (change)="problemPhenChange()">
                    <option value="">请选择</option>
                    <option
                      *ngFor="let item of proSlectedItem.childs[+proTypeParams.problemClass].phenomenon; let i = index"
                      [attr.value]="i">
                      {{ item.name }}
                    </option>
                  </select>
                </div>
              </div>

              <div class="col-sm-9" *ngIf="pcIsOther">
                <div class="clearfix">
                  <input [(ngModel)]="otherInpMess" class="form-control" placeholder="请输入问题原因" />
                </div>
              </div>
            </div>
          </div>
        </ng-template>

        <div class="form-group col-xs-12 col-sm-4" *ngIf="
            proTypeParams.phenomenon &&
            proSlectedItem.childs[+proTypeParams.problemClass].phenomenon[+proTypeParams.phenomenon].repairGuide
          ">
          <label class="control-label col-sm-3 no-padding-right">维修指导</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <select class="form-control inline_block fix_padding bottomborder"
                [(ngModel)]="proTypeParams.repairGuide">
                <option value="">请选择</option>
                <option *ngFor="
                    let item of proSlectedItem.childs[+proTypeParams.problemClass].phenomenon[+proTypeParams.phenomenon]
                      .repairGuide;
                    let i = index
                  " [attr.value]="i">
                  {{ item.name }}
                </option>
              </select>
            </div>
          </div>
        </div>

        <div class="form-group col-xs-12 col-sm-4"
          *ngIf="proTypeParams.problemType == '1' && proTypeParams.problemClass">
          <label class="control-label col-sm-3 no-padding-right">进厂限制</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <select name="isPush" class="form-control inline_block fix_padding bottomborder" [(ngModel)]="isPush">
                <option value="">请选择</option>
                <option value="1">限制</option>
                <option value="0">不限制</option>
              </select>
            </div>
          </div>
        </div>
        <!--<div class="form-group col-xs-12 col-sm-6" *ngIf="proTypeParams.phenomenon&&proSlectedItem.childs[+proTypeParams.problemClass].phenomenon[+proTypeParams.phenomenon].repairWay">
						<label class="control-label col-sm-3 no-padding-right">维修方式</label>
						<div class="col-sm-9">
							<div class="clearfix">
								<select  class="form-control inline_block fix_padding" [(ngModel)]="proTypeParams.repairWay" >
									<option value="">请选择</option>
									<option *ngFor="let item of proSlectedItem.childs[+proTypeParams.problemClass].phenomenon[+proTypeParams.phenomenon].repairWay;let i=index;" [attr.value]='i'>{{item.name}}</option>
								</select>
							</div>
						</div>
					</div>

					<div class="form-group col-xs-12 col-sm-6" *ngIf="proTypeParams.phenomenon&&proSlectedItem.childs[+proTypeParams.problemClass].phenomenon[+proTypeParams.phenomenon].pheDescribe">
						<label class="control-label col-sm-3 no-padding-right">现象描述</label>
						<div class="col-sm-9">
							<div class="clearfix">
								<select  class="form-control inline_block fix_padding" [(ngModel)]="proTypeParams.pheDescribe" >
									<option value="">请选择</option>
									<option *ngFor="let item of proSlectedItem.childs[+proTypeParams.problemClass].phenomenon[+proTypeParams.phenomenon].pheDescribe;let i=index;" [attr.value]='i'>{{item.name}}</option>
								</select>
							</div>
						</div>
					</div>-->

        <!--<div class="form-group col-xs-12 col-sm-6">
						<label class="control-label col-sm-3 no-padding-right">测式按钮</label>
						<div class="col-sm-9">
							<div class="clearfix">
								<button (click)="getSelectedVAL()">获取选择到的数据</button>
							</div>
						</div>
					</div>-->
      </div>

      <div class="col-xs-12 borderdiv"></div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="zeroBeforeDate">上货前置零</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input type="text" autocomplete="off" name="zeroBeforeDate" id="zeroBeforeDate"
              class="form-control getChartTime" [(ngModel)]="zeroBeforeDate" (click)="inpSelectEvent('zeroBeforeDate')"
              [ngClass]="{ endueTime: inpSelect == 'zeroBeforeDate' }"
              placeholder="上货前置零起始时间（时间格式：yyyy-MM-dd HH:mm:ss）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="upStartDate">上货开始</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input type="text" autocomplete="off" id="upStartDate" class="form-control getChartTime" name="upStartDate"
              [(ngModel)]="upStartDate" (click)="inpSelectEvent('upStartDate')"
              [ngClass]="{ endueTime: inpSelect == 'upStartDate' }" placeholder="上货点起始时间（时间格式：yyyy-MM-dd HH:mm:ss）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="upEndDate">上货结束</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input type="text" autocomplete="off" class="form-control getChartTime" name="upEndDate" id="upEndDate"
              [(ngModel)]="upEndDate" (click)="inpSelectEvent('upEndDate')"
              [ngClass]="{ endueTime: inpSelect == 'upEndDate' }" placeholder="上货点结束时间（时间格式：yyyy-MM-dd HH:mm:ss）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="downStartDate">卸货开始</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input autocomplete="off" class="form-control getChartTime" name="downStartDate" id="downStartDate"
              type="text" [(ngModel)]="downStartDate" (click)="inpSelectEvent('downStartDate')"
              [ngClass]="{ endueTime: inpSelect == 'downStartDate' }" placeholder="卸货点起始时间（时间格式：yyyy-MM-dd HH:mm:ss）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="downEndDate">卸货结束</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input autocomplete="off" class="form-control getChartTime" name="downEndDate" id="downEndDate" type="text"
              [(ngModel)]="downEndDate" (click)="inpSelectEvent('downEndDate')"
              [ngClass]="{ endueTime: inpSelect == 'downEndDate' }" placeholder="卸货点结束时间（时间格式：yyyy-MM-dd HH:mm:ss）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="zeroAfterDate">卸货后置零</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input autocomplete="off" class="form-control getChartTime" name="zeroAfterDate" id="zeroAfterDate"
              type="text" [(ngModel)]="zeroAfterDate" (click)="inpSelectEvent('zeroAfterDate')"
              [ngClass]="{ endueTime: inpSelect == 'zeroAfterDate' }"
              placeholder="卸货后置零结束时间（时间格式：yyyy-MM-dd HH:mm:ss）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="startWeight">上货前重量</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input class="form-control" autocomplete="off" name="startWeight" id="startWeight" type="text"
              value="0.0" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="weight">重量</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input autocomplete="off" class="form-control" name="weight" id="weight" type="text"
              placeholder="重量数据（如：30.25）" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3 no-padding-right" for="endWeight">卸货后重量</label>
        <div class="col-sm-9">
          <div class="clearfix">
            <input autocomplete="off" class="form-control" name="endWeight" id="endWeight" type="text" value="0.0" />
          </div>
        </div>
      </div>
      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3" for="isWave">数据波动</label>
        <div class="col-sm-9 clearfix">
          <div class="">
            <label style="vertical-align: middle; margin-bottom: 0">
              <input id="isWave" name="isWave" class="" type="checkbox" />
              <span class="lbl">1吨内</span>
            </label>
            <label style="vertical-align: middle; margin-bottom: 0">
              <span class="lbl">波动范围</span>
              <select [(ngModel)]="waveWeight" name="waveWeight" id="waveWeight"
                style="width: 80px; padding-left: 24px">
                <option value="0.1">0.1</option>
                <option value="0.2">0.2</option>
                <option value="0.3">0.3</option>
                <option value="0.4">0.4</option>
                <option value="0.5">0.5</option>
                <option value="0.6">0.6</option>
                <option value="0.7">0.7</option>
                <option value="0.8">0.8</option>
                <option value="0.9">0.9</option>
                <option value="1.0">1.0</option>
              </select>
            </label>
          </div>
        </div>
      </div>

      <div class="form-group col-xs-12 col-sm-4">
        <label class="control-label col-sm-3" for="isDiagonal">上卸货曲线</label>
        <div class="col-sm-9 clearfix">
          <div class="">
            <label style="vertical-align: middle; margin-bottom: 0">
              <input id="isDiagonal" name="isDiagonal" class="" type="checkbox" />
              <span class="lbl">斜线(默认是sin曲线)</span>
            </label>
          </div>
        </div>
      </div>
    </div>
    <div class="center">
      <button type="button" (click)="syncFactory(syncModal)" class="btn btn-primary btn-sm">厂区对接</button>
      &nbsp;&nbsp;
      <button type="button" (click)="renewDialog(renewModal)" class="btn btn-primary btn-sm" style="min-width: 60px">
        续费
      </button>
      &nbsp;&nbsp;
      <button type="button" (click)="resetWeightToZero()" class="btn btn-primary btn-sm" style="min-width: 60px">
        清零
      </button>
      &nbsp;&nbsp;
      <button type="button" (click)="submitRecord()" class="btn btn-primary btn-sm">
        <i class="fa fa-question-circle"></i>
        &nbsp; 问题记录
      </button>
      &nbsp;&nbsp;
      <button type="button" *ngIf="proTypeParams.problemType == '1'" (click)="submitDevice()"
        class="btn btn-primary btn-sm">
        <i class="fa fa-square-o"></i>
        &nbsp; 设备故障
      </button>
      &nbsp;&nbsp;
      <button id="btnAdd" type="button" (click)="recall()" class="btn btn-danger btn-sm">
        <i class="fa fa-trash-o"></i>
        &nbsp; 撤回
      </button>
      &nbsp;&nbsp;
      <button *ngIf="!isDisable" id="btnAdd" type="button" (click)="makeData()" class="btn btn-success btn-sm">
        <i class="fa fa-refresh"></i>
        &nbsp; 优化
      </button>
      <button *ngIf="isDisable" id="btnAdd" type="button" (click)="makeData()" class="btn btn-success btn-sm"
        disabled="disabled">
        <i class="fa fa-refresh"></i>
        &nbsp; 优化
      </button>
      &nbsp;&nbsp;
      <button id="btnAdd" type="button" (click)="recordTransportData()" class="btn btn-primary btn-sm">
        <i class="fa fa-cloud-upload"></i>
        &nbsp; 记录上卸货点
      </button>
      &nbsp;&nbsp;

      <button type="button" (click)="openConfigView(positionModal)" class="btn btn-primary btn-sm">
        <i class="fa fa-skyatlas"></i>
        &nbsp; 系数设置
      </button>
      &nbsp;&nbsp;

      <button type="button" (click)="openGroupMessageView(groupMessageModal)" class="btn btn-primary btn-sm">
        群消息信息
      </button>
    </div>
    <div class="hr hr-dotted"></div>
  </div>
</div>

<!--弹窗部分-->
<section bsModal #positionModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeConfigView(positionModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">系数配置-{{ coefCarNumber }}</h4>
      </div>
      <div class="modal-body row">
        <div class="profile-info-row col-xs-6" *ngFor="let item of coefficientList">
          <div class="profile-info-name">Channel {{ item.index }}</div>
          <div class="profile-info-value">
            <input [(ngModel)]="item.coef" type="text" class="input form-control"
              [ngClass]="{ green: item.coef !== 0 }" />
          </div>
        </div>
      </div>
      <div class="modal-footer" style="text-align: center">
        <button type="button" class="btn btn-default" (click)="closeConfigView(positionModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="getConfigParams()">重置</button>
        <button type="button" class="btn btn-primary" (click)="submitConfigMapped(positionModal)">提交</button>
      </div>
    </div>
  </div>
</section>

<!-- 设备详情信息    弹窗-->
<div id="deviceDetailModal" style="overflow: auto">
  <div class="modal-dialog modal-lg" style="width: 1000px">
    <div class="modal-content">
      <div class="modal-header" id="headDrag">
        <button type="button" class="close" (click)="cancelDeviceDetail()" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">
          设备信息
          <span class="note">[ 注: 鼠标点击可拖动 ]</span>
          <span *ngIf="isShowGPSAlert" class="red gps-alert">GPS更新异常</span>
        </h4>
        <div class="btn-group" style="position: absolute; right: 88px; top: 8px">
          <button class="btn btn-default no-margin" [ngClass]="{ 'btn-primary': btnGroupActive == '1' }"
            (click)="selectTimeFast('1')">
            一周
          </button>
          <!--<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '2'}" (click)="selectTimeFast('2')">半个月</button>-->
          <button class="btn btn-default no-margin" [ngClass]="{ 'btn-primary': btnGroupActive == '3' }"
            (click)="selectTimeFast('3')">
            一个月
          </button>
          <!--<button class="btn btn-default no-margin" [ngClass]="{'btn-primary':btnGroupActive == '4'}" (click)="selectTimeFast('4')">两个月</button>-->
          <button class="btn btn-default no-margin" [ngClass]="{ 'btn-primary': btnGroupActive == '5' }"
            (click)="selectTimeFast('5')">
            三个月
          </button>
          <button class="btn no-margin btn-default" [ngClass]="{ 'btn-primary': btnGroupActive == '6' }"
            (click)="selectTimeFast('6')">
            半年
          </button>
          <button class="btn no-margin btn-default" [ngClass]="{ 'btn-primary': btnGroupActive == '7' }"
            (click)="selectTimeFast('7')">
            全部
          </button>
        </div>
      </div>
      <div class="modal-body" style="padding: 20px; max-height: 998px; overflow: auto">
        <div class="row form-horizontal">
          <div>
            <div class="tabbable">
              <ul class="nav nav-tabs" id="myTab"
                style="padding-left: 12px; background-image: linear-gradient(#f1f5fd, #e9f0ff)">
                <li class="active s-lis">
                  <a data-toggle="tab" href="#all" (click)="getTabData('')">
                    设备信息
                    <span id="allOrders"></span>
                  </a>
                </li>
                <li class="s-lis" (click)="getTabData('8')"><a data-toggle="tab" href="#timeline">设备事件</a></li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#waitRepaired" (click)="getTabData('4_1')">
                    待维修
                    <span class="orange">{{ repairedDeviceInfo.waitFixedCount }}</span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#repaired" (click)="getTabData('4_2')">
                    已维修
                    <span class="green">{{ repairedDeviceInfo.fixedCount }}</span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" class="reqRecord" href="#question" (click)="getTabData('1')">
                    问题记录
                    <span class="red">{{ questionRecordTotal }}</span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#dataWaitFix" (click)="getTabData('2_1')">
                    数据待修复
                    <span class="orange">{{ dataFixInfo.exceptionOrderCount }}</span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#dataFix" (click)="getTabData('2')">
                    数据修复
                    <span class="green" *ngIf="dataFixInfo.dataFixCount || dataFixInfo.dataFixCount == 0">
                      {{ dataFixInfo.dataFixCount + dataFixInfo.truckFixCount }}
                    </span>
                  </a>
                </li>

                <li class="s-lis">
                  <a data-toggle="tab" class="alertRecord" href="#alert" (click)="getTabData('3')">
                    警报记录
                    <span class="red" *ngIf="alertDataInfo.shutDownCount || alertDataInfo.shutDownCount == 0">
                      {{
                      alertDataInfo.shutDownCount + alertDataInfo.offLineCount + alertDataInfo.shutDownExceptionCount
                      }}
                    </span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#weightData" (click)="getTabData('7')">
                    地磅数据
                    <span class="status-purple"></span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#version" (click)="getTabData('5')">
                    固件升级
                    <span class="status-purple"></span>
                  </a>
                </li>
                <li class="s-lis">
                  <a data-toggle="tab" href="#coef" (click)="getTabData('6')">
                    系数升级
                    <span class="status-purple"></span>
                  </a>
                </li>
              </ul>
              <div class="tab-content" style="padding: 0; border: none">
                <div id="all" class="tab-pane active">
                  <sa-device-info [deviceId]="deviceId" [endTime]="endDateBtn" [startTime]="startDateBtn"
                    [renewalInfo]="renewalInfo" [iccid]="deviceBaseInfo.iccid"></sa-device-info>
                  <!-- <div class="device-module clearfix">
											<h4>基本信息</h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">公司名称</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.companyName||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">车辆用途</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.userTypeName||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">司机姓名</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.driverName||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">车牌号码</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.carNumber||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">传感器类型</span><span class="item-value" [attr.title]="">
													<sa-sensor-type [sensorTypeId]="deviceBaseInfo.sensorType" type='2' [inputParam]="inputParam" [isSendRequest]='false'></sa-sensor-type>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">司机电话</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.phone||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">设备ID</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.deviceId||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">产品编码</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.productNo||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">录入人员</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.userNameForCreate||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">硬件版本</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.hwVersion||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">SIM卡号</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.iccid||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">安装时间</span><span class="item-value" [attr.title]="">{{deviceBaseInfo.inputDate||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">传感器通道</span><span class="item-value table_scroll" [attr.title]="">
												<span  class="channel-style bg-green" *ngFor="let item of deviceBaseInfo.sensorChannel">{{item}}</span>
												<span *ngIf="deviceBaseInfo.sensorChannel.length == 0">--</span>
											</span></div>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">当前系数</span><span class="item-value" [attr.title]="deviceBaseInfo.coef">
													<span *ngIf='deviceBaseInfo.coefT.length >0'>
														<span>[</span><span *ngFor="let lis of deviceBaseInfo.coefT;let i = index;">
															<span style="font-weight: bold;">CH{{lis.index}}:</span><span>{{lis.value}}<span *ngIf="i < deviceBaseInfo.coefT.length-1">,</span></span>
														</span><span>]</span>
													</span>
													<span *ngIf='deviceBaseInfo.coefT.length == 0'>--</span>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">算法版本</span><span class="item-value" [attr.title]="deviceBaseInfo.version">{{deviceBaseInfo.version||'--'}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>问题记录<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span><span class="item-detail" (click)="jumpQuestionByHand('','','total')">>> 详情</span></h4>
											<div class="item-box col-xs-4 no-padding" *ngFor="let item of questionRecordInfo"><span class="item-key">{{item.reason}}</span><span class="item-value jump-number" (click)="jumpQuestionByHand(item.exceptionType,item.programType,item.reasonCount)">{{item.reasonCount}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>数据修复<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">数据修复</span><span class="item-value jump-number" (click)="jumpDataFixList('1',dataFixInfo.dataFixCount)">{{dataFixInfo.dataFixCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">轨迹修复</span><span class="item-value jump-number" (click)="jumpDataFixList('2',dataFixInfo.truckFixCount)">{{dataFixInfo.truckFixCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">待修复[矩阵]</span><span class="item-value jump-number" (click)="jumpDataFixList('3',dataFixInfo.exceptionOrderCount)">{{dataFixInfo.exceptionOrderCount}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>警报记录<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span><span class="item-detail" (click)="jumpAlertDataList('','total')">>> 详情</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">断电警报</span><span class="item-value jump-number" (click)="jumpAlertDataList('2',alertDataInfo.shutDownCount)">{{alertDataInfo.shutDownCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">离线警报</span><span class="item-value jump-number" (click)="jumpAlertDataList('1',alertDataInfo.offLineCount)">{{alertDataInfo.offLineCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">异常断电警报</span><span class="item-value jump-number" (click)="jumpAlertDataList('3',alertDataInfo.shutDownExceptionCount)">{{alertDataInfo.shutDownExceptionCount}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>总磅单数<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">磅单总数</span><span class="item-value jump-number">{{weightData.WeightBridgeCount||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">最新磅单重量</span><span class="item-value">{{weightData.weight||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">最近磅单时间</span><span class="item-value jump-number">{{weightData.lastDate||'--'}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>维修记录<span style="font-weight: normal;"> [{{btnGroupActiveText}}]</span></h4>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">待维修记录</span><span class="item-value jump-number" (click)="jumpRepairedDeviceList('0','1',repairedDeviceInfo.waitFixedCount)">{{repairedDeviceInfo.waitFixedCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">已维修记录</span><span class="item-value jump-number" (click)="jumpRepairedDeviceList('1','2',repairedDeviceInfo.fixedCount)">{{repairedDeviceInfo.fixedCount}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">最新维修时间</span><span class="item-value">{{repairedDeviceInfo.lastRepariedTime||'--'}}</span></div>
										</div>
										<div class="device-module clearfix">
											<h4>设备状态</h4>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">在线状态</span><span class="item-value">
													<span *ngIf="deviceRealTimeDataInfo.runStatus == '1'" class="green">在线</span><span class="red" *ngIf="deviceRealTimeDataInfo.runStatus == '0'">离线<span *ngIf="deviceRealTimeDataInfo.alarmType == '0'||!deviceRealTimeDataInfo.alarmType">[未知原因]</span><span *ngIf="deviceRealTimeDataInfo.alarmType == '1'||deviceRealTimeDataInfo.alarmType == '2'">[断电中]</span><span *ngIf="deviceRealTimeDataInfo.alarmType == '3'">[异常断电]</span></span><span *ngIf="!deviceRealTimeDataInfo.runStatus">--</span>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">设备电压</span><span class="item-value">{{deviceRealTimeDataInfo.voltage||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding">
												<span class="item-key">警报类型</span><span class="item-value">
													<span *ngIf="deviceRealTimeDataInfo.alarmType == '0'||!deviceRealTimeDataInfo.alarmType">无警报</span><span *ngIf="deviceRealTimeDataInfo.alarmType == '2'" class="red">
														离线警报</span><span *ngIf="deviceRealTimeDataInfo.alarmType == '1'" class="red">断电警报
														</span>
												</span>
											</div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">更新时间</span><span class="item-value">{{deviceRealTimeDataInfo.updateTime||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">采集时间</span><span class="item-value">{{deviceRealTimeDataInfo.voltageTime||'--'}}</span></div>
											<div class="item-box col-xs-4 no-padding"><span class="item-key">警报时间</span><span class="item-value"><span class="red" *ngIf="deviceRealTimeDataInfo.alarmTime">{{deviceRealTimeDataInfo.alarmTime}}</span><span *ngIf="!deviceRealTimeDataInfo.alarmTime">--</span></span></div>

										</div>
										<span *ngIf="isShowOfflineAlert" class="red offline-alert left">异常离线[磅单数:{{weightCount}}][离线时长:{{offlineDiffTime}}]</span> -->
                </div>
                <div id="timeline" class="tab-pane">
                  <div class="clearfix">
                    <div class="device-module clearfix" style="margin-top: 12px" *ngIf="deviceBaseInfo">
                      <h4>基本信息</h4>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">车牌号码</span>
                        <span class="item-value" [attr.title]="">{{ deviceBaseInfo.carNumber || '--' }}</span>
                        <span *ngIf="deviceBaseInfo.deviceId">[{{ deviceBaseInfo.deviceId }}]</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">公司名称</span>
                        <span class="item-value" [attr.title]="">{{ deviceBaseInfo.companyName || '--' }}</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">安装时间</span>
                        <span class="item-value" [attr.title]="">{{ deviceBaseInfo.inputDate || '--' }}</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">录入人员</span>
                        <span class="item-value" [attr.title]="">{{ deviceBaseInfo.userNameForCreate || '--' }}</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">已安装[据今]</span>
                        <span class="item-value" [attr.title]="">{{ deviceBaseInfo.installTime || '--' }}</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">车辆用途</span>
                        <span class="item-value" [attr.title]="">{{ deviceBaseInfo.userTypeName || '--' }}</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">载重更新</span>
                        <span class="item-value" [attr.title]="">{{ otherData.carUploadDate || '--' }}</span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">传感器</span>
                        <span class="item-value" [attr.title]="">
                          <sa-sensor-type [sensorTypeId]="deviceBaseInfo.sensorType" type="2" [inputParam]="inputParam"
                            [isSendRequest]="false"></sa-sensor-type>
                        </span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">车辆状态</span>
                        <span class="item-value" [attr.title]="">
                          <span class="red" *ngIf="deviceRealTimeDataInfo.runStatus == '0'">
                            离线
                            <span *ngIf="deviceRealTimeDataInfo.alarmType == '0' || !deviceRealTimeDataInfo.alarmType">
                              [未知原因]
                            </span>
                            <span
                              *ngIf="deviceRealTimeDataInfo.alarmType == '1' || deviceRealTimeDataInfo.alarmType == '2'">
                              [断电中]
                            </span>
                            <span *ngIf="deviceRealTimeDataInfo.alarmType == '3'">[异常断电]</span>
                          </span>
                          <span class="green" *ngIf="deviceRealTimeDataInfo.runStatus !== '0'">在线</span>
                          <!-- <span class="red" *ngIf="versionMessage.isShowGPS">[GPS更新异常]</span> -->
                        </span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">GPS更新</span>
                        <span class="item-value" [attr.title]="">{{ otherData.gpsUploadDate || '--' }}</span>
                      </div>

                      <div class="item-box self-xs-25 no-padding" style="width: 40%">
                        <span class="item-key">算法版本</span>
                        <span class="item-value" [attr.title]="deviceBaseInfo.version"
                          style="max-width: calc(100% - 88px)">
                          {{ deviceBaseInfo.version || '--' }}
                        </span>
                      </div>
                      <div class="item-box self-xs-25 no-padding" style="width: 40%">
                        <span class="item-key">当前系数</span>
                        <span class="item-value" [attr.title]="deviceBaseInfo.coef"
                          style="max-width: calc(100% - 88px)">
                          <span *ngIf="deviceBaseInfo.coefT.length > 0">
                            <span>[</span>
                            <span *ngFor="let lis of deviceBaseInfo.coefT; let i = index">
                              <span style="font-weight: bold">CH{{ lis.index }}:</span>
                              <span>
                                {{ lis.value }}
                                <span *ngIf="i < deviceBaseInfo.coefT.length - 1">,</span>
                              </span>
                            </span>
                            <span>]</span>
                          </span>
                          <span *ngIf="deviceBaseInfo.coefT.length == 0">--</span>
                        </span>
                      </div>
                      <div class="item-box self-xs-25 no-padding">
                        <span class="item-key">传感器通道</span>
                        <span class="item-value table_scroll" [attr.title]="">
                          <span class="channel-style bg-green" *ngFor="let item of deviceBaseInfo.sensorChannel">
                            {{ item }}
                          </span>
                          <span *ngIf="deviceBaseInfo.sensorChannel.length == 0">--</span>
                        </span>
                      </div>
                    </div>
                  </div>
                  <div class="device-module clearfix" style="margin-top: 12px">
                    <h4>
                      主机生命周期
                      <span *ngIf="hostTableData.length"
                        [attr.title]="'当前为' + hostTableData.length + '号主机，已更换' + (hostTableData.length -1) + '次主机'">{{deviceBaseInfo.carNumber}}[{{hostTableData.length}}]</span>
                    </h4>
                    <div class="table_scroll first_row_style">
                      <table
                        class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table"
                        style="margin-bottom: 0 !important;border-bottom: 0 !important;">
                        <thead>
                          <tr>
                            <th class="width50">序号</th>
                            <th class="width60">状态</th>
                            <th class="width100">车牌号码</th>
                            <th class="width100">设备ID</th>
                            <th class="width90">物料名称</th>
                            <th class="width120">产品编号</th>
                            <th class="width120">原设备ID</th>
                            <th class="width120">工作时长</th>
                            <th style="text-align:center">安装时间</th>
                          </tr>
                        </thead>
                      </table>
                    </div>
                    <div [ngClass]="{'host_table': hostTableData.length > 3 }" class="table_scroll first_row_style">
                      <table
                        class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table"
                        style="border-top: 0 !important;">
                        <tbody *ngIf="hostTableData.length > 0">
                          <tr *ngFor="let row of hostTableData; let i = index">
                            <td class="width50">{{ row.number }}</td>
                            <td class="width60">
                              <span *ngIf="row.state === 0">拆卸</span>
                              <span *ngIf="row.state === 1">在用</span>
                            </td>
                            <td class="width100">{{ row.carNumber }}</td>
                            <td class="width100">{{ row.deviceId }}</td>
                            <td class="width90">{{ row.materielName }}</td>
                            <td class="width120">{{ row.materielNumber }}</td>
                            <td class="width120">{{ row.lastDeviceId }}</td>
                            <td class="width120">{{ row.workingTimeStr }}</td>
                            <td style="text-align:center">{{ row.installTime }}</td>
                          </tr>
                        </tbody>
                        <tbody *ngIf="hostTableData.length === 0">
                          <div style="text-align: center;height: 50px;line-height: 50px;">暂无数据</div>
                        </tbody>
                      </table>
                    </div>
                  </div>
                  <div class="device-module clearfix" style="margin-top: 12px">
                    <h4>
                      传感器生命周期
                      <span *ngIf="sensorListData.length"
                        [attr.title]="'当前设备安装' + sensorCount + '个传感器'">{{deviceBaseInfo.carNumber}}[{{sensorCount}}]</span>
                    </h4>
                    <div class="table_scroll first_row_style">
                      <table
                        class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table"
                        style="margin-bottom: 0 !important;border-bottom: 0 !important;">
                        <thead>
                          <tr>
                            <th class="width80">产品编号</th>
                            <th class="width80">序号</th>
                            <th class="width80">状态</th>
                            <th class="width100">车牌号码</th>
                            <th class="width100">设备ID</th>
                            <th class="width200">物料名称</th>
                            <th class="width120">工作时长</th>
                            <th style="text-align:center">安装时间</th>
                          </tr>
                        </thead>
                      </table>
                    </div>
                    <div [ngClass]="{'sensor_table': sensorListData.length > 5 }" class="table_scroll first_row_style">
                      <table
                        class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table"
                        style="border-top: 0 !important;">
                        <tbody *ngIf="sensorListData.length > 0">
                          <tr *ngFor="let row of sensorListData; let i = index">
                            <td class="width80" [rowSpan]="row.rowSpan" *ngIf="row.secondIndex == 0">
                              <span class="channel-style bg-green">
                                {{ row.materielNumber }}
                              </span>
                            </td>
                            <td class="width80">{{ row.number }}</td>
                            <td class="width80">
                              <span *ngIf="row.state === 0">拆卸</span>
                              <span *ngIf="row.state === 1">在用</span>
                            </td>
                            <td class="width100">{{ row.carNumber }}</td>
                            <td class="width100">{{ row.deviceId }}</td>
                            <td class="width200">{{ row.materielName }}</td>
                            <td class="width120">{{ row.workingTimeStr }}</td>
                            <td style="text-align:center">{{ row.installTime }}</td>
                          </tr>
                        </tbody>
                        <tbody *ngIf="sensorListData.length === 0">
                          <div style="text-align: center;height: 50px;line-height: 50px;">暂无数据</div>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
                <div id="question" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>录入人员</th>
                          <th>录入时间</th>
                          <th>设备ID</th>
                          <th>车牌号</th>
                          <th>版本</th>
                          <th>问题分类</th>
                          <th>现象分类</th>
                          <th>问题原因</th>
                          <th>车辆用途</th>
                          <th>用途分类</th>
                          <th>开始时间</th>
                          <th>结束时间</th>
                          <th>系数</th>
                          <th>状态</th>
                          <th>审核人员</th>
                          <th>审核时间</th>
                          <th>备注</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab1; let i = index" [attr.data-index]="i"
                          [ngClass]="{ selected: activeSelected === row.id }"
                          (dblclick)="waitRepairedRowSelect(row, 'question')">
                          <td>{{ row.createUserName }}</td>
                          <td>{{ row.createDate }}</td>
                          <td>{{ row.deviceId }}</td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.version }}</td>
                          <td>{{ row.exceptionType }}</td>
                          <td>{{ row.programType }}</td>
                          <td>{{ row.reason }}</td>
                          <td>{{ row.useTypeL1 }}</td>
                          <td>{{ row.useTypeL2 }}</td>
                          <td>{{ row.startDate }}</td>
                          <td>{{ row.endDate }}</td>
                          <td>
                            <span *ngIf="row.coef.length > 0">
                              <span>[</span>
                              <span *ngFor="let lis of row.coef; let i = index">
                                <span style="font-weight: bold">CH{{ lis.index }}:</span>
                                <span>
                                  {{ lis.value }}
                                  <span *ngIf="i < row.coef.length - 1">,</span>
                                </span>
                              </span>
                              <span>]</span>
                            </span>
                          </td>
                          <td>
                            <span *ngIf="row.isCheck == '1'" class="green">审核通过</span>
                            <span *ngIf="row.isCheck == '0'" class="orange">未审核</span>
                          </td>
                          <td>{{ row.userNameForCheck }}</td>
                          <td>{{ row.checkDate }}</td>
                          <td>{{ row.remark }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>
                <div id="dataFix" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>用户名</th>
                          <th>记录类型</th>
                          <th>车牌号码</th>
                          <th>记录时间</th>
                          <th>内容</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab2; let i = index" [attr.data-index]="i">
                          <td>{{ row.userName }}</td>
                          <td>
                            <span *ngIf="row.operation == '1'">数据修复</span>
                            <span *ngIf="row.operation == '2'">轨迹修复</span>
                          </td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.createTime }}</td>
                          <td>{{ row.content }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>

                <div id="dataWaitFix" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>订单编号</th>
                          <th>车牌号码</th>
                          <th>设备ID</th>
                          <th>空车过磅时间</th>
                          <th>重车过磅时间</th>
                          <th>净重</th>
                          <th>订单类型</th>
                          <th>开始卸货时间</th>
                          <th>卸货结束时间</th>
                          <th>异常描述</th>
                          <th>推送时间</th>
                          <th>推送状态</th>
                          <th>处理人</th>
                          <th>状态</th>
                          <th>录入时间</th>
                          <th>更新时间</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab2_1; let i = index" [attr.data-index]="i">
                          <td>{{ row.taskId }}</td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.deviceId }}</td>
                          <td>{{ row.emptyLoadDate }}</td>
                          <td>{{ row.fullLoadDate }}</td>
                          <td>{{ row.weight }}</td>
                          <td>
                            <span *ngIf="row.type == '1'">水泥订单</span>
                            <span *ngIf="row.type == '2'">物资订单</span>
                          </td>
                          <td>{{ row.unloadStartDate }}</td>
                          <td>{{ row.unloadEndDate }}</td>
                          <td>{{ row.remark }}</td>
                          <td>{{ row.pushDate }}</td>
                          <td>
                            <span *ngIf="row.isPush == '0'" class="orange">未推送</span>
                            <span *ngIf="row.isPush == '1'" class="green">已推送</span>
                          </td>
                          <td>{{ row.userName }}</td>
                          <td>
                            <span *ngIf="row.status == '0'" class="orange">待处理</span>
                            <span *ngIf="row.status == '1'" class="green">已处理</span>
                          </td>
                          <td>{{ row.createTime }}</td>
                          <td>{{ row.uploadTime }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>

                <div id="alert" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>设备ID</th>
                          <th>车牌号</th>
                          <th>所属公司</th>
                          <th>异常信息</th>
                          <th>关机时长</th>
                          <th>关机时间</th>
                          <th>开机时间</th>
                          <th>地址</th>
                          <th>状态</th>
                          <th>处理意见</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab3; let i = index" [attr.data-index]="i">
                          <td>{{ row.deviceId }}</td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.companyName }}</td>
                          <td>{{ row.message }}</td>
                          <td>
                            <span *ngIf="row.type == 1">
                              <span *ngIf="!row.onTime || row.totalSecond == '0秒'">离线中</span>
                              <span *ngIf="row.totalSecond && row.onTime">{{ row.totalSecond }}</span>
                            </span>
                            <span *ngIf="row.type == 2">
                              <span *ngIf="!row.onTime || row.totalSecond == '0秒'">断电中</span>
                              <span *ngIf="row.totalSecond && row.onTime">{{ row.totalSecond }}</span>
                            </span>
                            <span *ngIf="row.type == 3">
                              <span *ngIf="!row.onTime || row.totalSecond == '0秒'">无</span>
                              <span *ngIf="row.onTime && row.totalSecond">{{ row.onTime }}</span>
                            </span>
                          </td>
                          <td>{{ row.offTime }}</td>
                          <td>
                            <span *ngIf="row.type == 1">
                              <span *ngIf="!row.onTime || row.totalSecond == '0秒'">离线中</span>
                              <span *ngIf="row.onTime && row.totalSecond">{{ row.onTime }}</span>
                            </span>
                            <span *ngIf="row.type == 2">
                              <span *ngIf="!row.onTime || row.totalSecond == '0秒'">断电中</span>
                              <span *ngIf="row.onTime && row.totalSecond">{{ row.onTime }}</span>
                            </span>
                            <span *ngIf="row.type == 3">
                              <span *ngIf="!row.onTime || row.totalSecond == '0秒'">无</span>
                              <span *ngIf="row.onTime && row.totalSecond">{{ row.onTime }}</span>
                            </span>
                          </td>
                          <td>{{ row.address }}</td>
                          <td>
                            <span *ngIf="row.handleStatus == 0" class="orange">未处理</span>
                            <span *ngIf="row.handleStatus == 1" class="green">已处理</span>
                          </td>
                          <td>{{ row.addvice }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>
                <div id="waitRepaired" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>操作</th>
                          <th>进厂限制</th>
                          <th>录入人员</th>
                          <th>录入时间</th>
                          <th>故障类型</th>
                          <th>故障现象</th>
                          <th>故障时间</th>
                          <th>维修指导</th>
                          <!-- <th>故障来源</th>
                          <th>备注</th> -->
                          <th>最后编辑</th>
                          <th>故障状态</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab4_1; let i = index" [attr.data-index]="i"
                          [ngClass]="{ selected: activeSelected === row.id }"
                          (dblclick)="waitRepairedRowSelect(row, 'wait')">
                          <td>
                            <button type="button" (click)="deleteRepaireRow(row)">删除</button>
                            <button type="button" (click)="autoReset(limitModal,row)">限制</button>
                            <!-- 传感器检测白名单 -->
                            <button type="button"
                              (click)="handleSensorBypassSetting(sensorBypassModal,row)">传感器检测白名单</button>
                          </td>
                          <td>
                            <span *ngIf="row.isPush == '1'">限制</span>
                            <span *ngIf="row.isPush == '0' && !row.restrictTime">不限制</span>
                            <span *ngIf="row.restrictTime">
                              {{ row.restrictTime }}后开始限制
                              <button type="button" (click)="cancelRestrict(row)" *ngIf="row.restrictTimeFlag">
                                取消限制
                              </button>
                            </span>
                            <!-- <span *ngIf="row.isPush == '1'">限制</span>
                            <span *ngIf="row.isPush == '0'">不限制</span> -->
                          </td>
                          <td>{{ row.creater }}</td>
                          <td>{{ row.createTime }}</td>
                          <td>{{ row.faultTypeName }}</td>
                          <td>{{ row.faultPhenomenon }}</td>
                          <td>{{ row.faultTime }}</td>
                          <td>{{ row.repairedGuide }}</td>
                          <!-- <td>{{ row.updateSource }}</td>
                          <td>{{ row.remark }}</td> -->
                          <td>{{ row.lastUpdateTime }}</td>
                          <td>
                            <span *ngIf="row.repairedStatus == '0'" class="orange">待维修</span>
                            <span *ngIf="row.repairedStatus == '1'" class="green">已维修</span>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>
                <div id="repaired" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>设备ID</th>
                          <th>车牌号码</th>
                          <th>用途分类</th>
                          <th>公司名称</th>
                          <th>维修人员</th>
                          <th>维修订单创建时间</th>
                          <th>维修时间</th>
                          <th>故障现象</th>
                          <th>维修内容</th>
                          <th>维修细分</th>
                          <th>维修编号</th>
                          <th>维修费用[元]</th>
                          <th>支付状态</th>
                          <th>维修状态</th>
                          <th>是否审核</th>
                          <th>审核人员</th>
                          <th>审核时间</th>
                          <th>审核意见</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab4_2; let i = index" [attr.data-index]="i"
                          [ngClass]="{ selected: activeSelected === row.id }"
                          (dblclick)="waitRepairedRowSelect(row, 'fixed')">
                          <td>{{ row.deviceId }}</td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.useTypeL2 }}</td>
                          <td>{{ row.companyName }}</td>
                          <td>{{ row.repairedUserName }}</td>
                          <td>{{ row.repairOrderCreateTime }}</td>
                          <td>{{ row.repairedTime }}</td>
                          <td>{{ row.faultPhenomenonList }}</td>
                          <td>{{ row.repairContentList }}</td>
                          <td>{{ row.repairSubdivideList }}</td>
                          <td>{{ row.repairedNumber }}</td>
                          <td>
                            <span>{{ row.price / 100 }}</span>
                          </td>
                          <td>
                            <span *ngIf="row.payStatus == 1">待支付</span>
                            <span *ngIf="row.payStatus == 2">已支付</span>
                            <span *ngIf="row.payStatus == 3">订单取消</span>
                          </td>
                          <td>
                            <span class="green">已维修</span>
                          </td>
                          <td>
                            <span *ngIf="row.auditStatus === 0" class="orange">未审核</span>
                            <span *ngIf="row.auditStatus === 1" class="green">审核通过</span>
                            <span *ngIf="row.auditStatus === 2" class="red">审核不通过</span>
                          </td>
                          <td>{{ row.auditUser }}</td>
                          <td>{{ row.auditDate }}</td>
                          <td>{{ row.describe }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>
                <div id="version" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>用户名称</th>
                          <th>设备ID</th>
                          <th>车牌号</th>
                          <th>操作内容</th>
                          <th>升级状态</th>
                          <th>版本名称</th>
                          <th>版本号</th>
                          <th>前版本号</th>
                          <th>时间</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab5">
                          <td>{{ row.userName }}</td>
                          <td>{{ row.deviceId }}</td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.content }}</td>
                          <td>
                            <span *ngIf="row.status === '0'" style="color: #ffb752">等待升级</span>
                            <span *ngIf="row.status === '2'" style="color: #4cae4c">升级成功</span>
                          </td>
                          <td>{{ row.binName }}</td>
                          <td>{{ row.version }}</td>
                          <td>{{ row.prevVersion }}</td>
                          <td>{{ row.createTime }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>
                <div id="coef" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <th>操作人</th>
                          <th>设置时间</th>
                          <th>应答时间</th>
                          <th>设置状态</th>
                          <th>下发系数</th>
                          <th>前系数</th>
                          <th>创建时间</th>
                          <th>更新时间</th>
                          <th>设备ID</th>
                          <th>车牌号码</th>
                          <th>公司名称</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab6">
                          <td>{{ row.userName }}</td>
                          <td>{{ row.sendTime }}</td>
                          <td>{{ row.ackTime }}</td>
                          <td>
                            <!-- 设置状态 type 	0：已提交	1：待下发	2：已下发	3：设置成功 -->
                            <span [ngClass]="{ orange: row.type == 1, grey: row.type == 2, green: row.type == 3 }">
                              {{ row.status }}
                            </span>
                          </td>
                          <td>
                            <span *ngIf="row.newCoef.length > 0">
                              <span>[</span>
                              <span *ngFor="let lis of row.newCoef; let i = index">
                                <span style="font-weight: bold">CH{{ lis.index }}:</span>
                                <span>
                                  {{ lis.value }}
                                  <span *ngIf="i < row.newCoef.length - 1">,</span>
                                </span>
                              </span>
                              <span>]</span>
                            </span>
                          </td>
                          <td>
                            <span *ngIf="row.oldCoef.length > 0">
                              <span>[</span>
                              <span *ngFor="let lis of row.oldCoef; let i = index">
                                <span style="font-weight: bold">CH{{ lis.index }}:</span>
                                <span>
                                  {{ lis.value }}
                                  <span *ngIf="i < row.oldCoef.length - 1">,</span>
                                </span>
                              </span>
                              <span>]</span>
                            </span>
                          </td>
                          <td>{{ row.createTime }}</td>
                          <td>{{ row.updateTime }}</td>
                          <td>{{ row.deviceId }}</td>
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.companyName }}</td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCountTab" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginateTab($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="refreshTab()">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>

                <div id="weightData" class="tab-pane">
                  <div class="table_scroll">
                    <table
                      class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                      <thead>
                        <tr>
                          <!--<th style="width: 55px;"><input type="checkbox" (change)="selectFn()" /></th>-->
                          <th>车牌号</th>
                          <th>过磅称重时间</th>
                          <th>载重量</th>
                          <th>是否审核</th>
                          <th>任务编号</th>
                          <th>操作</th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr *ngFor="let row of tableDataTab7; let i = index" [attr.data-index]="i">
                          <!--<td><input type="checkbox" (change)="onCheckboxChangeFn(row.id)" /></td>-->
                          <td>{{ row.carNumber }}</td>
                          <td>{{ row.date }}</td>
                          <td>{{ row.weight }}</td>
                          <td>
                            <span *ngIf="row.review" class="green">已审核</span>
                            <span *ngIf="!row.review" class="red">未审核</span>
                          </td>
                          <td>{{ row.taskId }}</td>
                          <td>
                            <button type="button" (click)="editRow(row, editModal, $event)">编辑</button>
                            <button type="button" (click)="deleteRow(row)">删除</button>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="table-fix clearfix">
                    <paginator [totalRecords]="totalCount" [rows]="pageSizeTab" [currentPage]="curPageTab - 1"
                      (onPageChange)="paginate($event)"></paginator>
                    <button type="button" class="btn default refresh_btn" (click)="getTableDataTab('7')">
                      <i class="fa fa-refresh"></i>
                    </button>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!--设备详情信息  end-->

<!-- 磅单数据 -->
<!--编辑行表格弹窗-->
<section bsModal #editModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" aria-label="Close" (click)="cancelEdit(editModal)">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">编辑地磅数据</h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal" name="rowDataForm" id="rowDataForm" novalidate="novalidate"
          [saBootstrapValidator]="validatorOptions">
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">
              车牌号码
              <sup>*</sup>
            </label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="carNumber" [(ngModel)]="handleRow.carNumber" placeholder="车牌号码"
                  type="text" />
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">
              过磅时间
              <sup>*</sup>
            </label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="uploadDate" [(ngModel)]="handleRow.date" placeholder="过磅称重时间"
                  type="text" />
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">载重量[吨]</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="weight" [(ngModel)]="handleRow.weight" placeholder="载重量"
                  type="text" />
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">是否审核</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <select name="review" class="form-control" [(ngModel)]="handleRow.review">
                  <option value="">请选择</option>
                  <option value="true">是</option>
                  <option value="false">否</option>
                </select>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">任务编号</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="taskId" placeholder="任务编号" type="text"
                  [(ngModel)]="handleRow.taskId" />
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="cancelEdit(editModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="editSubmit(editModal)">确认</button>
      </div>
    </div>
  </div>
</section>
<!--编辑行表格弹窗 弹窗-->
<!--编辑设备信息  弹窗-->
<section bsModal #editDeciceModal="bs-modal" class="modal" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeEditDeciceModal(editDeciceModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">编辑设备信息</h4>
      </div>
      <div class="modal-body">
        <div class="row form-horizontal">
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">
              用途
              <sup>*</sup>
            </label>
            <div class="col-sm-9">
              <div class="clearfix s_fix_select2">
                <select class="form-control select2" id="useTypeSelect" select2 name="carUseType" style="width: 100%">
                  <option value="">请选择</option>
                  <optgroup *ngFor="let item of carTypeList" [label]="item.label">
                    <option *ngFor="let itemChild of item.children" [value]="itemChild.id">
                      {{ itemChild.label }}
                    </option>
                  </optgroup>
                </select>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">传感器类型</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <sa-sensor-type (sensorSelected)="sensorSelected($event)" Width="100%" [sensorTypeId]="page.sensorType"
                  Height="32px" [isShow]="false" type="1" [inputParam]="inputParam"
                  [isSendRequest]="false"></sa-sensor-type>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">传感器数量</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" id="sensorAmount" name="sensorAmount" type="text"
                  [(ngModel)]="page.sensorAmount" placeholder="传感器数量" />
              </div>
            </div>
          </div>
          <div class="form-group sensorCH">
            <label class="control-label col-sm-2 no-padding-right">传感器</label>
            <div class="col-sm-9">
              <div style="border: 1px solid #ccc; padding-bottom: 8px; padding-left: 12px">
                <div>
                  <label class="checkbox-inline" *ngFor="let item of deviceSensorArr">
                    <input type="checkbox" class="checkbox style-0" [value]="item.id" [name]="item.text"
                      [(ngModel)]="item.checked" (change)="deviceSensorChange(item.id, $event)" />
                    <span>{{ item.text }}</span>
                  </label>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">通道[前轴]</label>
            <div class="col-sm-9">
              <div class="passWay1">
                <div *ngFor="let item of sensorAxleFront" style="display: inline-block; width: auto; height: auto">
                  <span *ngIf="item.checked" class="wayChannel wayCheck" (click)="sensorAxleFrontChange(item, $event)">
                    {{ item.text }}
                  </span>
                  <span *ngIf="item.isDisable" class="wayChannel wayDisable">{{ item.text }}</span>
                  <span *ngIf="!item.isDisable && !item.checked" class="wayChannel"
                    (click)="sensorAxleFrontChange(item, $event)">
                    {{ item.text }}
                  </span>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">通道[后轴]</label>
            <div class="col-sm-9">
              <div class="passWay2">
                <div *ngFor="let item of sensorAxleAfter" style="display: inline-block; width: auto; height: auto">
                  <span *ngIf="item.checked" class="wayChannel wayCheck" (click)="sensorAxleAfterChange(item, $event)">
                    {{ item.text }}
                  </span>
                  <span *ngIf="item.isDisable" class="wayChannel wayDisable">{{ item.text }}</span>
                  <span *ngIf="!item.isDisable && !item.checked" class="wayChannel"
                    (click)="sensorAxleAfterChange(item, $event)">
                    {{ item.text }}
                  </span>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">车轴数量</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="carAxleAmount" id="carAxleAmount" type="text"
                  [(ngModel)]="page.carAxleAmount" placeholder="车轴数量"
                  (input)="carAxleAmountChange($event.target.value)" />
              </div>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-2 no-padding-right">安装位置</label>
            <div class="col-sm-9">
              <div class="install">
                <div class="install-contain" *ngIf="page.carAxleAmount != 0 || page.carAxleAmount == ''">
                  <table
                    class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                    <thead>
                      <tr class="install-header">
                        <th></th>
                        <th>左</th>
                        <th>中</th>
                        <th>右</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr *ngFor="let row of installArray; let i = index" [attr.data-index]="i">
                        <td>轴{{ row.index }}</td>
                        <td>
                          <div class="installDiv install-L">
                            <span *ngFor="let channel of row.positionLMR[0].sensorChannel" class="mayChannel">
                              {{ channel }}
                              <i (click)="cancelChannel(row.index, 'left', channel)">x</i>
                            </span>
                            <span class="add" (click)="addinstall(row.index, 'left', installModal)">+</span>
                          </div>
                        </td>
                        <td>
                          <div class="installDiv install-M">
                            <span *ngFor="let channel of row.positionLMR[1].sensorChannel" class="mayChannel">
                              {{ channel }}
                              <i (click)="cancelChannel(row.index, 'middle', channel)">x</i>
                            </span>
                            <span class="add" (click)="addinstall(row.index, 'middle', installModal)">+</span>
                          </div>
                        </td>
                        <td>
                          <div class="installDiv install-R">
                            <span *ngFor="let channel of row.positionLMR[2].sensorChannel" class="mayChannel">
                              {{ channel }}
                              <i (click)="cancelChannel(row.index, 'right', channel)">x</i>
                            </span>
                            <span class="add" (click)="addinstall(row.index, 'right', installModal)">+</span>
                          </div>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">GPS天线</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <select class="form-control" name="gpsAntenna" [(ngModel)]="page.gpsAntenna" style="width: 100%"
                  (change)="gpsAntennaChange($event.target.value)">
                  <option value="">请选择</option>
                  <option *ngFor="let gpsObj of gpsOptions" [value]="gpsObj.value">{{ gpsObj.text }}</option>
                </select>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">GSM天线</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <select class="form-control" name="gsmAntenna" [(ngModel)]="page.gsmAntenna" style="width: 100%"
                  (change)="gsmAntennaChange($event.target.value)">
                  <option value="">请选择</option>
                  <option *ngFor="let gsmObj of gsmOptions" [value]="gsmObj.value">{{ gsmObj.text }}</option>
                </select>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">司机姓名</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="driverName" type="text" [(ngModel)]="page.driverName"
                  placeholder="司机姓名" />
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="control-label col-sm-2 no-padding-right">司机电话</label>
            <div class="col-sm-9">
              <div class="clearfix">
                <input class="form-control" name="phone" type="text" [(ngModel)]="page.phone" placeholder="司机电话" />
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="closeEditDeciceModal(editDeciceModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="submitEditDeciceModal(editDeciceModal)">提交</button>
      </div>
    </div>
  </div>
</section>
<!--编辑设备信息  弹窗  end-->
<!--  传感器通道弹窗-->
<div bsModal #installModal="bs-modal" id="lgModal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="lgModalhide(installModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">传感器通道</h4>
      </div>
      <div class="modal-body">
        <div class="row">
          <form class="form form-inline" role="form">
            <div class="row">
              <div class="form-group">
                <label class="control-label" style="margin-right: 10px">传感器:</label>
                <div class="inline_block checkChannel" *ngFor="let item of checkChannel">
                  <span *ngIf="item.checked" class="channel check" (click)="choiceChannel(item, $event)">
                    {{ item.text }}
                  </span>
                  <span *ngIf="item.isDisable" class="channel disable">{{ item.text }}</span>
                  <span *ngIf="!item.isDisable && !item.checked" class="channel" (click)="choiceChannel(item, $event)">
                    {{ item.text }}
                  </span>
                </div>
              </div>
            </div>
          </form>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="lgModalhide(installModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="lgModalConfirm(installModal)">确认</button>
      </div>
    </div>
  </div>
</div>
<!--弹窗end-->

<!-- 曲线图查看   弹窗-->
<!--<section bsModal #echartMapModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">-->
<section id="echartMapModal">
  <div class="modal-dialog modal-lg" style="width: 800px; margin: 0">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeEchartMapModal()" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">曲线图</h4>
      </div>
      <div class="modal-body">
        <div class="row form-horizontal">
          <sa-chart-bmap [height]="325" [isAuditData]="false" [offDatas]="true" [inputParams]="echartParam"
            [isBaiduMap]="true" (outerSend)="initMapDate($event)" (outerIsMap)="isHasMapView($event)"></sa-chart-bmap>
          <div [hidden]="!isShowMapView">
            <sa-bmap-chart [trackParams]="drawTrackList" [height]="325" deviceId="deviceId"></sa-bmap-chart>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
<!-- 曲线图查看 弹窗end-->
<!-- 工具箱   弹窗-->
<div class="hold-all">
  <div class="hold-all-narrow" *ngIf="isHold">
    <img src="assets/img/hold.png" alt="" class="holdImg" (click)="clickHold(false)" />
  </div>
  <div class="hold-all-open" *ngIf="!isHold">
    <div class="hold-cont">
      <!--title="鼠标点击可拖动"-->
      <p class="hold-title">工具箱</p>
      <div class="hold-waitFixed" *ngIf="waitFixedRecord.length != 0">
        <span class="hold-cont-tit">待维修</span>
        <div style="max-height: 200px; overflow: auto">
          <div class="gpsRecordDiv" *ngFor="let item of waitFixedRecord">
            <p>
              <label>进厂限制：</label>
              <span *ngIf="item.isPush == '1'">限制</span>
              <span *ngIf="item.isPush == '0'">不限制</span>
            </p>
            <p>
              <label>录入人员：</label>
              <span>{{ item.creater }}</span>
            </p>
            <p>
              <label>录入时间：</label>
              <span>{{ item.createTime }}</span>
            </p>
            <p>
              <label>故障类型：</label>
              <span>{{ item.faultTypeName }}</span>
            </p>
            <p>
              <label>故障现象：</label>
              <span>{{ item.faultPhenomenon }}</span>
            </p>
            <p>
              <label>故障时间：</label>
              <span>{{ item.faultTime }}</span>
            </p>
          </div>
        </div>
      </div>
      <div class="hold-fixed" *ngIf="isFixedRecord">
        <span class="hold-cont-tit">最近一次维修</span>
        <div>
          <p>
            <label>维修人员：</label>
            <span>{{ fixedRecord.repairedUserName }}</span>
          </p>
          <p>
            <label>维修时间：</label>
            <span>{{ fixedRecord.repairedTime }}</span>
          </p>
          <p>
            <label>维修记录：</label>
            <span>{{ fixedRecord.repairSubdivideList }}</span>
          </p>
        </div>
      </div>
      <div *ngIf="!isFixedRecord && waitFixedRecord.length == 0" style="text-align: center; margin: 10px auto">
        暂无维修数据
      </div>
      <div class="hold-fixed" *ngIf="gpsRecord.length != 0">
        <span class="hold-cont-tit">GPS检测结果</span>
        <div style="max-height: 200px; overflow: auto">
          <div class="gpsRecordDiv" *ngFor="let item of gpsRecord">
            <p>
              <label>事件名称：</label>
              <span>{{ item.eventName }}</span>
            </p>
            <p>
              <label>事件描述：</label>
              <span>{{ item.eventDescription }}</span>
            </p>
            <p>
              <label>开始时间：</label>
              <span>{{ item.startTime }}</span>
            </p>
            <p>
              <label>结束时间：</label>
              <span>{{ item.endTime }}</span>
            </p>
          </div>
        </div>
      </div>
      <div class="hold-btn">
        <button class="btn btn-primary" (click)="testingGPS()">GPS检测</button>
      </div>
    </div>
    <img src="assets/img/hold-open.png" alt="" class="holdOpenImg" (click)="clickHold(true)" />
  </div>
</div>
<!-- 工具箱 结束-->

<!--续费弹窗-->
<section bsModal #renewModal="bs-modal" id="renewModal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" style="width: 1350px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" aria-label="Close" (click)="cancelRenew(renewModal)">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">编辑续费</h4>
      </div>
      <div class="modal-body">
        <div class="form-group" style="margin-bottom: 20px">
          <span style="margin-right: 15px">车牌号码:{{ renewForm.carNumber }}</span>
          <span>安装时间:{{ renewForm.installTime }}</span>
        </div>
        <div class="table_scroll">
          <table
            class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
            <thead>
              <tr>
                <th></th>
                <th>厂区名称</th>
                <th>支付时间</th>
                <th>续费时长[月]</th>
                <th>备注</th>
                <th>状态</th>
                <th>对接时间</th>
                <th>剩余天数</th>
                <th>缴费次数</th>
                <th>服务到期时间</th>
                <th>保修到期时间</th>
              </tr>
            </thead>
            <tbody *ngIf="renewTableList.length != 0">
              <tr *ngFor="let row of renewTableList; let i = index" [attr.data-index]="i">
                <td style="width: 45px">
                  <div class="checkbox" style="margin: 0; left: 5px; text-align: center; width: 40px">
                    <label class="checkbox-label">
                      <input type="checkbox" class="checkbox style-0" [(ngModel)]="row.isChecked"
                        (click)="rowRenewSelected($event, i)" />
                      <span class="checkbox-flag"></span>
                    </label>
                  </div>
                </td>
                <td>{{ row.dockingFactoryName }}</td>
                <td>
                  <input name="payDate" id="payDate{{ i }}" autocomplete="off" type="text" placeholder="请选择"
                    [(ngModel)]="row.payDate" style="padding: 3px 5px; border: 1px solid #ddd"
                    (change)="payDateChange($event, i)" />
                </td>
                <td>
                  <input name="renewalTime" [(ngModel)]="row.renewalTime"
                    onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" placeholder="请输入续费时长"
                    style="padding: 3px 5px; border: 1px solid #ddd; width: 120px"
                    (change)="renewalTimeChange($event, i)" />
                </td>
                <td>
                  <!-- <input name="remark" [(ngModel)]="row.remark" placeholder="请输入备注"
                    style="padding: 3px 5px; border: 1px solid #ddd; width: 120px"
                    (change)="remarkChange($event, i)" /> -->

                  <textarea [(ngModel)]="row.remark" name="remark" autocomplete="off" placeholder="请输入备注" type="text"
                    rows="1" style="padding: 3px 5px; border: 1px solid #ddd; width: 150px"
                    (change)="remarkChange($event, i)"></textarea>
                </td>
                <td>
                  <span *ngIf="row.expire == '0'" style="color: #ed4800">未启用</span>
                  <span *ngIf="row.expire == '1'" style="color: #ed4800">已到期</span>
                  <span *ngIf="row.expire == '2'" style="color: #69aa46">未到期</span>
                  <span *ngIf="row.expire == '3'" style="color: #f39c12">将到期</span>
                </td>
                <td>{{ row.dockingTime }}</td>
                <td>
                  <span style="color: #ed4800" *ngIf="row.remainingDay && row.isSurplus">
                    {{ row.expireTime || '--' }}
                  </span>
                  <span *ngIf="row.remainingDay && !row.isSurplus">{{ row.expireTime || '--' }}</span>
                  <span *ngIf="!row.remainingDay">无限期</span>
                </td>
                <td style="color: #1a6ddd">
                  {{ row.renewCount ? row.renewCount + '次 ' : '0次' }}
                  <span style="cursor: pointer" [ngStyle]="{ display: row.renewCount ? 'inline-block' : 'none' }"
                    (click)="see_renewDetails(row, renewDetailsModal)">
                    >>缴费详情
                  </span>
                </td>
                <td>{{ row.renewalDueTime }}</td>
                <td>
                  {{ row.isSyncwarranty == 1 ? row.warrantyExpirationTime : '--' }}
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <!-- <div class="form-group clearfix" style="line-height: 32px">
          <label class="control-label col-sm-1 no-padding-right">备注</label>
          <div class="col-sm-9">
            <div class="clearfix">
              <input
                class="form-control"
                name="remark"
                type="text"
                [(ngModel)]="renewForm.remark"
                placeholder="请输入备注"
              />
            </div>
          </div>
        </div> -->
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="cancelRenew(renewModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="renewSubmit(renewModal, submitCheckModal)">确认</button>
      </div>
    </div>
  </div>
</section>
<!--编辑行表格弹窗 弹窗-->

<!-- 提交核对 -->
<div bsModal #submitCheckModal="bs-modal" id="submitCheckModal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true" style="overflow: auto">
  <div class="modal-dialog modal-lg" style="width: 1200px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="cancelSubmitCheck(submitCheckModal, renewModal)"
          aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">提交核对</h4>
      </div>
      <div class="modal-body" style="padding: 15px">
        <div class="page-header clearfix s_table_opreation"
          style="margin-top: 0px; margin-bottom: 15px; padding-bottom: 15px">
          <div class="left page-header-btn">
            <div class="top_module">
              <span class="module_text">提交前状态</span>
              <select name="isSuccess" id="" class="module_inp" [(ngModel)]="isSuccess">
                <option value="">全部</option>
                <option value="1">成功</option>
                <option value="0">失败</option>
              </select>
            </div>
            <button type="button" class="btn btn-primary" (click)="queryCheckTable()">查询</button>
            <button type="button" class="btn btn-primary" (click)="exportCheckData()">导出</button>
          </div>
          <div class="right top-search" style="text-align: right">
            <button type="button" class="btn btn-primary" (click)="batchDelete()">批量删除</button>
          </div>
        </div>
        <div class="table_scroll">
          <table
            class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
            <thead>
              <tr>
                <th>
                  <div class="checkbox" style="margin: 0; left: 5px; text-align: center">
                    <label>
                      <input type="checkbox" class="checkbox style-0" [(ngModel)]="allChecked"
                        (click)="allSelected()" />
                      <span></span>
                    </label>
                  </div>
                </th>
                <th>提交前状态</th>
                <th>车牌号</th>
                <th>设备ID</th>
                <th>对接厂区</th>
                <th>上次服务到期时间</th>
                <th>缴费时间</th>
                <th>续费时长[月]</th>
                <th>备注</th>
                <th>本次服务开始时间</th>
                <th>本次服务到期时间</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody *ngIf="submitCheckTableData.length != 0">
              <tr *ngFor="let row of submitCheckTableData; let i = index" [attr.data-index]="i"
                (click)="rowSelected(row, $event, i)">
                <td>
                  <div class="checkbox" style="margin: 0; left: 5px; text-align: center">
                    <label class="checkbox-label">
                      <input type="checkbox" class="checkbox style-0" [(ngModel)]="row.isChecked"
                        (click)="rowSelected(row, $event, i)" />
                      <span class="checkbox-flag"></span>
                    </label>
                  </div>
                </td>
                <td>
                  <span *ngIf="row.isSuccess == 1" style="color: green">成功</span>
                  <span *ngIf="row.isSuccess == 0" style="color: red">失败</span>
                </td>
                <td>{{ row.carNumber }}</td>
                <td>{{ row.deviceId }}</td>
                <td>
                  <span style="width: 150px; word-break: break-word">{{ row.companyName }}</span>
                </td>
                <td>{{ row.firstServiceEndDate }}</td>
                <td>{{ row.renewalDate }}</td>
                <td>{{ row.renewalCycle }}</td>
                <td>{{ row.remark }}</td>
                <td>{{ row.startTime }}</td>
                <td>{{ row.endTime }}</td>
                <td>
                  <button type="button" (click)="editSubmitCheck(row, editSubmitCheckModal)">编辑</button>
                  <button type="button" (click)="delSubmitCheck(row)">删除</button>
                </td>
              </tr>
            </tbody>
            <tbody *ngIf="submitCheckTableData.length == 0"
              style="height: 50px; margin: 0 auto; text-align: center; line-height: 50px">
              暂无查询数据
            </tbody>
          </table>
        </div>
        <div class="table-fix clearfix">
          <paginator [totalRecords]="checkTotalCounts" [rows]="checkPageSize" [currentPage]="checkCurPage - 1"
            (onPageChange)="checkPaginate($event)"></paginator>
          <button type="button" class="btn default refresh_btn" (click)="checkRefresh()">
            <i class="fa fa-refresh"></i>
          </button>
        </div>
      </div>
      <div class="footerNum" style="padding-left: 20px; font-size: 15px">{{ numMessage }}</div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="cancelSubmitCheck(submitCheckModal, renewModal)">
          取消
        </button>
        <button type="button" class="btn btn-primary" (click)="submitCheck(submitCheckModal)">提交</button>
      </div>
    </div>
  </div>
</div>
<!-- 提交核对 end-->

<!-- 编辑提交核对 -->
<section bsModal #editSubmitCheckModal="bs-modal" class="modal fade addRenewal" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeEditSubmitCheck(editSubmitCheckModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">编辑</h4>
      </div>
      <div class="modal-body">
        <form id="dataCleaning" class="form-horizontal" role="form" novalidate="novalidate"
          [saBootstrapValidator]="cleaningOptions">
          <div class="row form-horizontal">
            <div class="form-group">
              <label class="control-label col-sm-2 no-padding-right">
                车牌号码
                <sup>*</sup>
              </label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <input class="form-control" name="carNumber" id="carNumber" autocomplete="off"
                    [(ngModel)]="editcheckForm.carNumber" type="text" disabled />
                </div>
              </div>
            </div>
            <div class="form-group s_fix_select2">
              <label class="control-label col-sm-2 no-padding-right">
                对接厂区
                <sup>*</sup>
              </label>
              <div class="col-xs-9">
                <select name="isSuccess" id="" class="dockingListSelect" [(ngModel)]="editcheckForm.companyId"
                  (change)="dockingListChange()">
                  <option value="" *ngFor="let item of DockingList" [value]="item.value">{{ item.key }}</option>
                </select>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-2 no-padding-right">
                上次服务到期时间
                <sup>*</sup>
              </label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <input class="form-control" name="firstServiceEndDate" id="firstServiceEndDate" autocomplete="off"
                    [(ngModel)]="editcheckForm.firstServiceEndDate" type="text" disabled />
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-2 no-padding-right">
                缴费时间
                <sup>*</sup>
              </label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <input class="form-control" name="renewalDate" id="renewalDate" autocomplete="off" type="text"
                    [(ngModel)]="editcheckForm.renewalDate" placeholder="缴费时间" />
                </div>
              </div>
            </div>
            <div class="form-group clearfix">
              <label class="control-label col-sm-2 no-padding-right">续费时长[月]</label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <input class="form-control" name="renewalCycle" autocomplete="off" type="text"
                    onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" [(ngModel)]="editcheckForm.renewalCycle"
                    placeholder="续费时长" (input)="renewalCycleChange()" />
                </div>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-2 no-padding-right">
                备注
              </label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <textarea class="form-control" name="remark" id="remark" autocomplete="off"
                    [(ngModel)]="editcheckForm.remark" type="text"></textarea>
                </div>
              </div>
            </div>
            <!-- <div class="form-group">
							<label class="control-label col-sm-2 no-padding-right">本次服务结束时间<sup>*</sup></label>
							<div class="col-sm-9">
								<div class="clearfix">
									<input class="form-control" name="endTime" id="endTime" autocomplete="off" [(ngModel)]='editcheckForm.endTime' type="text"  disabled/>
								</div>
							</div>
						</div> -->
            <div class="form-group">
              <label class="control-label col-sm-2 no-padding-right">
                失败原因
                <sup>*</sup>
              </label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <textarea class="form-control" name="errorMsg" id="errorMsg" autocomplete="off"
                    [(ngModel)]="editcheckForm.errorMsg" type="text" disabled></textarea>
                </div>
              </div>
            </div>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="closeEditSubmitCheck(editSubmitCheckModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="submitEditSubmitCheck(editSubmitCheckModal)">
          确定
        </button>
      </div>
    </div>
  </div>
</section>
<!-- 编辑提交核对 end-->

<!-- 续费详情弹框 -->
<div bsModal #renewDetailsModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
  <div class="modal-dialog modal-lg" style="width: 1000px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="renewDetailsClose(renewDetailsModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">缴费详情</h4>
      </div>
      <div class="modal-body">
        <div class="infoWrap">
          <div class="table_scroll">
            <table
              class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
              <thead>
                <tr>
                  <th>车牌号</th>
                  <th>对接公司</th>
                  <th>缴费时间</th>
                  <th>开始时间</th>
                  <th>结束时间</th>
                  <th>缴费类型</th>
                  <th>续费时长</th>
                  <th>备注</th>
                </tr>
              </thead>
              <tbody>
                <tr *ngFor="let row of renewDetailsTable">
                  <td>{{ row.carNumber }}</td>
                  <td>{{ row.companyName }}</td>
                  <td>{{ row.createDate }}</td>
                  <td>{{ row.startTime }}</td>
                  <td>{{ row.endTime }}</td>
                  <td>
                    <span *ngIf="row.billType == 1">服务费</span>
                    <span *ngIf="row.billType == 2">对接费</span>
                  </td>
                  <td>{{ row.renewalCycle ? row.renewalCycle + '个月' : '' }}</td>
                  <td>{{ row.remark }}</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- 续费详情弹框  结束 -->

<!-- 同步厂区 -->
<section bsModal #syncModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm" style="width: 800px">
    <div class="modal-content">
      <form id="projectCarFrom" class="form-horizontal" role="form" novalidate="novalidate"
        [saBootstrapValidator]="syncValidator">
        <div class="modal-body">
          <div class="row form-horizontal">
            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">车牌</label>
              <div class="col-sm-10">
                <input class="form-control" disabled type="text" name="companyNameT"
                  [value]="projectCarFrom.carNumber" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">安装厂区</label>
              <div class="col-sm-10">
                <input disabled class="form-control" [value]="projectCarFrom.installFactoryName" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">已对接厂区</label>
              <div class="col-sm-10">
                <input disabled class="form-control" [value]="projectCarFrom.dockedFactoryName" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">
                对接厂区
                <sup>*</sup>
              </label>
              <div class="col-sm-10">
                <sa-company-tree wrap="html" wrapId="projectCarFrom" companyTreeId="companyTree4" [Height]="32"
                  inputName="dockingFactory" [companyNameValue]="projectCarFrom.dockingFactoryName"
                  [companyParentList]="companyParentList" [companyIdValue]="projectCarFrom.dockingFactoryId"
                  (companySelected)="syncCompanySelect($event)"></sa-company-tree>
              </div>
            </div>

            <div class="form-group col-xs-12" style="margin-bottom: 0px">
              <label class="control-label col-sm-2 no-padding-right">对接角色</label>
              <div class="col-sm-10">
                <div class="clearfix fix_select2">
                  <div class="checkBoxRole">
                    <label *ngFor="let item of userList">
                      <input type="checkbox" name="dockingRole" [id]="item.id"
                        (input)="checkBoxRole($event.target, item.id)" [checked]="item.check" />
                      {{ item.text }}
                    </label>
                  </div>
                </div>
                <div>
                  <span *ngIf="userList.length == 0 && projectCarFrom.dockingFactoryName" class="red">
                    提示：{{ RoleXxplain }}
                  </span>
                  <button class="btn btn-link right btnRole" (click)="jumpToPage($event, '/system/project-config')"
                    style="margin: 0; padding: 0" title="跳转对接配置">
                    >> 新增角色
                  </button>
                </div>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right"></label>
              <div class="col-sm-10" (click)="resetSelectClick()" style="width: 45%">
                <span class="el-checkbox__inner" [ngClass]="{ 'is-checked': isResetSelected }"></span>
                <span>重置服务到期时间、续费次数</span>
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" (click)="projectCarClose(syncModal)">取消</button>
          <button type="button" class="btn btn-primary" (click)="projectCarSubmit(syncModal)">同步</button>
        </div>
      </form>
    </div>
  </div>
</section>

<section bsModal #groupMessageModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm" style="width: 800px">
    <div class="modal-content">
      <form id="groupMessageFrom" class="form-horizontal" role="form" novalidate="novalidate"
        [saBootstrapValidator]="groupMsgValidator">
        <div class="modal-body">
          <div class="row form-horizontal">
            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">车牌</label>
              <div class="col-sm-10">
                <input class="form-control" type="text" name="carNumber" [(ngModel)]="groupMessageFrom.carNumber"
                  id="groupMessageCarNumberInput" [disabled]="groupMessageFrom.type != '12'" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">安装厂区</label>
              <div class="col-sm-10">
                <input disabled class="form-control" name="installFactoryNameInput" id="installFactoryNameInput"
                  [(ngModel)]="groupMessageFrom.installFactoryName" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">
                群名称
                <sup>*</sup>
              </label>
              <div class="col-sm-10">
                <input class="form-control" name="groupNameInput" id="groupNameInput"
                  [(ngModel)]="groupMessageFrom.groupName" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">
                提问题的人
                <sup>*</sup>
              </label>
              <div class="col-sm-10">
                <input class="form-control" name="questionerInput" [(ngModel)]="groupMessageFrom.questioner" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">
                问题
                <sup>*</sup>
              </label>
              <div class="col-sm-10">
                <input class="form-control" name="questionInput" [(ngModel)]="groupMessageFrom.question" />
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">
                归类
                <sup>*</sup>
              </label>
              <div class="col-sm-10">
                <select id="groupMsgType" name="groupMsgType" [(ngModel)]="groupMessageFrom.type"
                  class="form-control inline_block fix_padding bottomborder" (change)="msgTypeChange()">
                  <option value="">请选择</option>
                  <option value="1">设备状态查询</option>
                  <option value="2">订单-传感器问题</option>
                  <option value="3">订单-GPS问题</option>
                  <option value="4">订单-离线</option>
                  <option value="5">订单-算法问题</option>
                  <option value="6">订单-磅单问题</option>
                  <option value="7">订单-数据正常</option>
                  <option value="8">续费</option>
                  <option value="9">同步</option>
                  <option value="10">更改ID</option>
                  <option value="11">移机-改车牌</option>
                  <option value="12">临时放行</option>
                  <option value="13">录车</option>
                </select>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">项目</label>
              <div class="col-sm-10">
                <sa-company-tree wrap="html" wrapId="groupMessageFrom" companyTreeId="companyTreeRecord" [Height]="32"
                  [inputApi]="inputApi" inputName="projectName" [companyNameValue]="groupMessageFrom.projectName"
                  [companyParentList]="companyParentList" [companyIdValue]="groupMessageFrom.projectId"
                  (companySelected)="massageCompanySelected($event)"></sa-company-tree>
              </div>
            </div>

            <div class="form-group col-xs-12">
              <label class="control-label col-sm-2 no-padding-right">备注</label>
              <div class="col-sm-10">
                <input class="form-control" name="remarkInput" [(ngModel)]="groupMessageFrom.remark" />
              </div>
            </div>
          </div>
          <div *ngIf="msgHistoryList.length > 0" class="massage-history" (click)="showHistoryModal(msgHistoryModal)">
            历史
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" (click)="groupMessageClose(groupMessageModal)">取消</button>
          <button type="button" class="btn btn-primary" (click)="resetGroupMessage()">清空</button>
          <button type="button" class="btn btn-primary" (click)="groupMessageSubmit()">记录</button>
        </div>
      </form>
    </div>
  </div>
</section>

<div id="autoResetModal">
  <div class="modal-dialog modal-sm" style="width: 700px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeDeviceModal()" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">重置ID</h4>
      </div>
      <div class="modal-body">
        <div class="reset-top">
          <input placeholder="请选择新主机ID" class="device-input common-input" [(ngModel)]="autoResetDeviceId" type="text"
            disabled />
          <button type="button" class="btn btn-primary reset-btn" (click)="confirmDevice()">重置</button>
          <button type="button" class="btn btn-primary reset-btn" (click)="showSelectModal(resetDeviceModal)">
            新主机ID
          </button>
        </div>

        <div class="reset-row">
          <div class="row-title">上传频率：</div>
          <div class="row-content">{{ autoResetBase.freqNum }}</div>
          <div class="row-icon">
            <div class="fa-icons" *ngIf="statusIcon">
              <!-- 成功 -->
              <i *ngIf="autoResetState.coefStatus === 1" style="color: #07c160" class="fa fa-3x fa-check"></i>
              <!-- 失败 -->
              <i *ngIf="autoResetState.coefStatus === 2" style="color: #ee0a24" class="fa fa-3x fa-close"></i>
              <!-- Loading 自己加动画转起来 -->
              <i *ngIf="autoResetState.coefStatus === 3" class="fa fa-3x fa-circle-o-notch circle-animation"></i>
            </div>
          </div>
        </div>

        <div class="reset-row">
          <div class="row-title">硬件版本：</div>
          <div class="row-content">{{ autoResetBase.hwVersion }}</div>
          <div class="row-icon">
            <div class="fa-icons" *ngIf="statusIcon">
              <!-- 成功 -->
              <i *ngIf="autoResetState.coefStatus === 1" style="color: #07c160" class="fa fa-3x fa-check"></i>
              <!-- 失败 -->
              <i *ngIf="autoResetState.coefStatus === 2" style="color: #ee0a24" class="fa fa-3x fa-close"></i>
              <!-- Loading 自己加动画转起来 -->
              <i *ngIf="autoResetState.coefStatus === 3" class="fa fa-3x fa-circle-o-notch circle-animation"></i>
            </div>
          </div>
        </div>

        <div class="reset-row">
          <div class="row-title">当前系数：</div>
          <div class="row-content">{{ autoResetBase.coefficient }}</div>
          <div class="row-icon">
            <div class="fa-icons" *ngIf="statusIcon">
              <!-- 成功 -->
              <i *ngIf="autoResetState.coefStatus === 1" style="color: #07c160" class="fa fa-3x fa-check"></i>
              <!-- 失败 -->
              <i *ngIf="autoResetState.coefStatus === 2" style="color: #ee0a24" class="fa fa-3x fa-close"></i>
              <!-- Loading 自己加动画转起来 -->
              <i *ngIf="autoResetState.coefStatus === 3" class="fa fa-3x fa-circle-o-notch circle-animation"></i>
            </div>
          </div>
        </div>

        <div class="reset-row">
          <div class="row-title">算法版本：</div>
          <div class="row-content">{{ autoResetBase.version }}</div>
          <div class="row-icon">
            <div class="fa-icons" *ngIf="statusIcon">
              <!-- 成功 -->
              <i *ngIf="autoResetState.coefStatus === 1" style="color: #07c160" class="fa fa-3x fa-check"></i>
              <!-- 失败 -->
              <i *ngIf="autoResetState.coefStatus === 2" style="color: #ee0a24" class="fa fa-3x fa-close"></i>
              <!-- Loading 自己加动画转起来 -->
              <i *ngIf="autoResetState.coefStatus === 3" class="fa fa-3x fa-circle-o-notch circle-animation"></i>
            </div>
          </div>
        </div>

        <div class="bin-content" *ngIf="autoResetState.binContent || autoResetState.errMsg">
          <span>{{ autoResetState.step }}:</span>
          {{ autoResetState.errMsg || autoResetState.binContent }}
        </div>
      </div>
    </div>
  </div>
</div>

<!--重置ID 选择车辆弹框-->
<section bsModal #resetDeviceModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" style="width: 1000px">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title">新主机ID</h4>
      </div>
      <div class="modal-body">
        <div class="form-group" style="margin-bottom: 20px">
          <input placeholder="请输入新的主机ID，不少于三位" class="common-input" [(ngModel)]="autoResetSearchKey" type="text" />
          <button type="button" class="btn btn-primary reset-btn" (click)="searchNewDeviceId()">搜索</button>
        </div>
        <div class="table_scroll">
          <table
            class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
            <thead>
              <tr>
                <th></th>
                <th>设备ID</th>
                <th>车辆状态</th>
                <th>重量更新时间</th>
                <th>GPS更新时间</th>
              </tr>
            </thead>
            <tbody *ngIf="resetDeviceTableList.length != 0">
              <tr *ngFor="let row of resetDeviceTableList; let i = index" [attr.data-index]="i">
                <td style="width: 45px">
                  <div class="checkbox" style="margin: 0; left: 5px; text-align: center; width: 40px">
                    <label class="checkbox-label">
                      <input type="checkbox" class="checkbox style-0" [(ngModel)]="row.isChecked"
                        (click)="rowDeviceSelected($event, i)" />
                      <span class="checkbox-flag"></span>
                    </label>
                  </div>
                </td>
                <td>{{ row.deviceId }}</td>
                <td>
                  <span [class]="[row.runStatus === '0' ? 'red' : 'green']">
                    {{ row.runStatus == '0' ? '离线' : '在线' }}
                  </span>
                </td>
                <td>
                  {{ row.carUploadDate }}
                </td>
                <td>
                  {{ row.gpsUploadDate }}
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div class="table-fix clearfix">
          <paginator [totalRecords]="totalCountDevice" [rows]="pageSizeDevice" [currentPage]="curPageDevice - 1"
            (onPageChange)="paginateDevice($event)"></paginator>
          <button type="button" class="btn default refresh_btn" (click)="refreshDevice()">
            <i class="fa fa-refresh"></i>
          </button>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="closeModal(resetDeviceModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="selectDevice(resetDeviceModal)">确认</button>
      </div>
    </div>
  </div>
</section>

<section bsModal #msgHistoryModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm" style="width: 500px">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeModal(msgHistoryModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">群消息历史记录</h4>
      </div>
      <div class="modal-body">
        <div *ngFor="let item of msgHistoryList" class="history-item" (click)="copyHistory(item, msgHistoryModal)">
          <div class="history-title">问题：{{ item.question }}</div>
          <div class="history-detail">
            <div class="detail-category">群名称：{{ item.groupName }}</div>
            <div class="detail-category">提问题的人：{{ item.questioner }}</div>
            <div class="detail-category">问题：{{ item.question }}</div>
            <div class="detail-category">归类：{{ item.typeDesc }}</div>
            <div class="detail-category">项目：{{ item.projectName }}</div>
            <div class="detail-category">备注：{{ item.remark }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

<!--  批量进厂限制-->
<div bsModal #limitModal="bs-modal" id="limitModal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeModal(limitModal)" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">批量进厂限制</h4>
      </div>
      <div class="modal-body">
        <div class="row">
          <form class="form" role="form">
            <div class="row" style="margin-bottom: 10px">
              <div class="form-group">
                <label class="control-label">是否批量进厂限制：</label>
                <div class="inline_block">
                  <label class="radio radio-inline" style="vertical-align: inherit">
                    <input type="radio" class="radiobox" name="0" value="0" [(ngModel)]="lgisPush" />
                    <span>不限制</span>
                  </label>
                  <label class="radio radio-inline" style="vertical-align: inherit">
                    <input type="radio" class="radiobox" name="1" value="1" [(ngModel)]="lgisPush" />
                    <span>限制</span>
                  </label>
                  <label class="radio radio-inline" style="vertical-align: inherit">
                    <input type="radio" class="radiobox" name="time" value="time" [(ngModel)]="lgisPush" />
                    <span>
                      自定义限制[
                      <span *ngIf="isPushTime == 6">默认</span>
                      <span>{{ isPushTime }}</span>
                      小时后进行限制]
                    </span>
                  </label>
                  <input type="number" *ngIf="lgisPush == 'time'" οnkeyup="value=value.replace(/[^\d]/g,'')"
                    (change)="inputChange()" name="isPushTime" placeholder="默认6小时" [(ngModel)]="isPushTime"
                    style="width: 84px; padding: 0 12px" />
                </div>
              </div>
            </div>
          </form>
        </div>
      </div>
      <div style="width: 60%; display: inline-block; position: absolute; bottom: 16px; left: 12px">
        <p style="color: #ccc">
          <span>【说明】</span>
          <span>自定义限制：设置时间[小时]后，车辆进厂限制生效，没有生效之前车辆允许进厂。</span>
        </p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" (click)="closeModal(limitModal)">取消</button>
        <button type="button" class="btn btn-primary" (click)="submitLimitModal(limitModal)">确认</button>
      </div>
    </div>
  </div>
</div>

<!-- 添加传感器检测白名单-->
<section bsModal #sensorBypassModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="sensorBypassModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" id="sensorBypassModal">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" (click)="closeSetFrequency(sensorBypassModal)" aria-label="Close"><span
            aria-hidden="true">&times;</span></button>

        <h4 class="modal-title">添加传感器检测白名单 <span class="jump-link" (click)="handleJumpFault()">查看白名单列表 >></span></h4>
      </div>
      <div class="modal-body">
        <form id="setFrequencyFrom" class="form-horizontal" role="form" novalidate="novalidate"
          [saBootstrapValidator]="sensorBypassValidatorOptions">
          <div class="row form-horizontal">
            <!-- <div class="form-group">
              <label class="col-md-2 control-label">车牌号码</label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <select class="select2 form-control" style="width:100%" name="carNumber" id="setFrequencySelect2">
                    <option value=''></option>
                  </select>
                </div>
              </div>
            </div> -->

            <div class="form-group">
              <label class="col-md-2 control-label">白名单时长<sup>*</sup></label>
              <div class="col-sm-9">
                <div class="inline_block">
                  <label class="radio radio-inline" style="vertical-align: inherit">
                    <input type="radio" class="radiobox" name="status" value="1" [(ngModel)]="sensorBypassModel.status"
                      (change)="handleSersonBypassStatusChange()" />
                    <span>长期</span>
                  </label>
                  <label class="radio radio-inline" style="vertical-align: inherit">
                    <input type="radio" class="radiobox" name="status" value="2"
                      [(ngModel)]="sensorBypassModel.status" />
                    <span>自定义天数</span>
                  </label>
                  <label class="radio radio-inline" style="vertical-align: inherit">
                    <input type="radio" class="radiobox" name="status" value="3" [(ngModel)]="sensorBypassModel.status"
                      (change)="handleSersonBypassStatusChange()" />
                    <span>
                      取消白名单
                    </span>
                  </label>
                </div>
              </div>
            </div>

            <div *ngIf="sensorBypassModel.status == '2'" class="form-group">
              <div class="col-md-2"></div>
              <div class="col-sm-9 clearfix">
                <input class="form-control" name="days" type="number" οnkeyup="value=value.replace(/[^\d]/g,'')"
                  (change)="sensorBypassInputChange()" placeholder="请输入自定义天数" [(ngModel)]="sensorBypassModel.days"
                  style="width: 200px; padding: 0 12px" />
              </div>
            </div>

            <div class="form-group clearfix">
              <label class="control-label col-sm-2 no-padding-right">白名单原因</label>
              <div class="col-sm-9">
                <div class="clearfix">
                  <input class="form-control" name="describe" [(ngModel)]='sensorBypassModel.describe' type="text"
                    placeholder="填写白名单原因" />
                </div>
              </div>
            </div>

          </div>
        </form>

      </div>
      <div class="modal-footer sensor-bypass-footer">
        <div style="width:350px">
          说明：添加白名单后，该车辆不进行传感器检测，直至取消白名单
        </div>
        <div style="width: 210px;">
          <button type="button" class="btn btn-default" (click)="closeModal(sensorBypassModal)">取消</button>
          <button type="button" class="btn btn-primary" (click)="editSensorBypassModal(sensorBypassModal)">提交</button>
        </div>
      </div>
    </div>
  </div>
</section>
<!-- 添加传感器检测白名单 结束 -->
<!--弹窗end-->
<style>
  .jump-link {
    color: #3BA4DE;
    cursor: pointer;
    padding-left: 16px;
    font-weight: normal;
  }

  /* 取消自动频率弹框 footer */
  .sensor-bypass-footer {
    text-align: unset;
    display: flex;
    justify-content: space-between;
  }

  .sensorModuleFront {
    position: relative;
  }

  .sensorModuleFront .sensorFront {
    position: absolute;
    width: 20px;
    height: 20px;
    left: -13px;
    font-size: 12px;
    border-radius: 50%;
    color: #fff;
    -webkit-transform: scale(0.9);
    transform: scale(0.7);
    font-weight: bold;
    font-style: normal;
  }

  .sensorModuleFront .front {
    top: -3px;
    background: #666633;
  }

  .sensorModuleFront .bottom {
    top: -3px;
    background: #663333;
  }

  .checkBoxRole {
    width: 100%;
    border: 1px solid #ccc;
    min-height: 34px;
    padding: 5px 10px;
    margin-bottom: 5px;
  }

  .checkBoxRole label {
    margin-right: 10px;
    margin-bottom: 0px;
    position: relative;
    padding: 2px 5px;
  }

  .checkBoxRole label input {
    position: relative;
    top: 2px;
    margin-right: 5px;
  }

  .checkBoxRole .checkLabelRole {
    background-color: #0075ff;
    border: none;
    color: #fff;
  }

  .checkBoxRole .checkLabelRole input {
    background-color: #0075ff;
    border: none;
    color: #fff;
  }

  .massage-history {
    text-align: right;
    text-decoration: underline;
    color: #0075ff;
    border-bottom: #0075ff;
    cursor: pointer;
  }

  .history-item {
    background-color: #f5f7fa;
    border: 1px solid #f1f5fd;
    border-radius: 8px;
    min-height: 40px;
    padding: 4px 12px;
    margin: 6px 0;
  }

  .history-title {
    font-size: 14px;
    font-weight: 500;
  }

  .history-detail {
    padding: 8px 0;
    color: #303133;
  }

  /* .history-detail>.detail-category {
    flex-basis: 33.3%;
  } */
  /* 重置ID */
  #autoResetModal {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 1000;
    display: none;
  }

  .common-input {
    width: 220px;
    height: 28px;
    line-height: 24px;
    border: 1px solid #b3b6bc;
    border-radius: 4px;
    padding: 0 6px;
  }

  .reset-top {
    margin: 8px;
  }

  .reset-top .device-input {
    width: 270px;
  }

  .reset-btn {
    margin-left: 8px;
    padding: 4px 6px;
  }

  .reset-row {
    display: flex;
    justify-content: space-between;
    height: 32px;
    line-height: 28px;
    margin: 8px;
  }

  .reset-row .row-title {
    min-width: 80px;
  }

  .reset-row .row-content {
    flex-grow: 1;
  }

  .reset-row .row-icon {
    min-width: 32px;
  }

  .bin-content {
    padding: 4px 8px;
    text-align: center;
    font-size: 12px;
    color: #969799;
  }

  .fa-icons {
    width: 20px;
    height: 20px;
    color: #0075ff;
    font-size: 8px;
  }

  .circle-animation {
    animation-name: circling;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
  }

  @keyframes circling {
    from {
      transform: rotate(0turn);
    }

    to {
      transform: rotate(1turn);
    }
  }

  .first_row_style .width50 {
    text-align: center;
    width: 50px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style .width60 {
    text-align: center;
    width: 60px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style .width80 {
    text-align: center;
    width: 80px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style .width90 {
    text-align: center;
    width: 90px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style .width100 {
    text-align: center;
    width: 100px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style .width120 {
    text-align: center;
    width: 120px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style .width200 {
    text-align: center;
    width: 200px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    vertical-align: middle;
  }

  .first_row_style.sensor_table {
    max-height: 230px;
    overflow-y: auto;
  }

  .first_row_style.host_table {
    max-height: 150px;
    overflow-y: auto;
  }

  .expired-factory-color {
    color: #f0ad4e;
  }
</style>